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

Method dockFocusChanged

src/frontend/MainWin.cpp:580–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578}
579
580void MainWin::dockFocusChanged(ads::CDockWidget* old, ads::CDockWidget* now) {
581 Q_UNUSED(old);
582 if (!now) {
583 updateGUI();
584 return;
585 }
586
587 auto* view = dynamic_cast<ContentDockWidget*>(now);
588 if (!view)
589 return; // project explorer or propertiesexplorer can be ignored
590 if (view == m_currentDock) {
591 // do nothing, if the current sub-window gets selected again.
592 // This event happens, when labplot loses the focus (modal window is opened or the user switches to another application)
593 // and gets it back (modal window is closed or the user switches back to labplot).
594 return;
595 } else
596 m_currentDock = view;
597
598 if (!m_suppressCurrentSubWindowChangedEvent)
599 m_projectExplorer->setCurrentAspect(view->part());
600}
601
602void MainWin::initActions() {
603 // ******************** File-menu *******************************

Callers

nothing calls this directly

Calls 2

setCurrentAspectMethod · 0.80
partMethod · 0.45

Tested by

no test coverage detected