MCPcopy Create free account
hub / github.com/KDE/labplot / handleCurrentAspectChanged

Method handleCurrentAspectChanged

src/frontend/MainWin.cpp:2143–2161  ·  view source on GitHub ↗

! called when the current aspect in the tree of the project explorer was changed. Selects the new aspect. */

Source from the content-addressed store, hash-verified

2141 Selects the new aspect.
2142*/
2143void MainWin::handleCurrentAspectChanged(AbstractAspect* aspect) {
2144 DEBUG(Q_FUNC_INFO)
2145 if (!aspect)
2146 aspect = m_project; // should never happen, just in case
2147
2148 m_suppressCurrentSubWindowChangedEvent = true;
2149 if (aspect->folder() != m_currentFolder) {
2150 m_currentFolder = aspect->folder();
2151 updateDockWindowVisibility();
2152 }
2153
2154 m_currentAspect = aspect;
2155
2156 // activate the corresponding MDI sub window for the current aspect
2157 activateSubWindowForAspect(aspect);
2158 m_suppressCurrentSubWindowChangedEvent = false;
2159
2160 updateGUI();
2161}
2162
2163void MainWin::activateSubWindowForAspect(const AbstractAspect* aspect) {
2164 Q_ASSERT(aspect);

Callers

nothing calls this directly

Calls 1

folderMethod · 0.80

Tested by

no test coverage detected