| 578 | } |
| 579 | |
| 580 | void 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 | |
| 602 | void MainWin::initActions() { |
| 603 | // ******************** File-menu ******************************* |
nothing calls this directly
no test coverage detected