fix(cpn): update main window menus and toolbars on fixing invalid models (#5890)

This commit is contained in:
Neil Horne
2025-02-12 09:48:58 +10:00
committed by GitHub
parent 9a4b462b91
commit 4c071f6555
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -758,6 +758,7 @@ MdiChild * MainWindow::createMdiChild()
connect(child, &MdiChild::modified, this, &MainWindow::onSubwindowModified);
connect(child, &MdiChild::newStatusMessage, statusBar(), &QStatusBar::showMessage);
connect(child, &MdiChild::destroyed, win, &QMdiSubWindow::close);
connect(child, &MdiChild::navigationUpdated, this, &MainWindow::updateMenus);
connect(win, &QMdiSubWindow::destroyed, this, &MainWindow::updateWindowActions);
updateWindowActions();
+2
View File
@@ -374,6 +374,8 @@ void MdiChild::updateNavigation()
action[ACT_MDL_PRT]->setEnabled(singleModelSelected);
action[ACT_MDL_SIM]->setEnabled(singleModelSelected && !invalidModels());
action[ACT_MDL_ERR]->setEnabled(singleModelSelected && radioData.models[getCurrentModel()].modelErrors);
emit navigationUpdated();
}
void MdiChild::retranslateUi()
+1
View File
@@ -106,6 +106,7 @@ class MdiChild : public QWidget
signals:
void modified();
void newStatusMessage(const QString & msg, const int duration);
void navigationUpdated();
protected:
virtual void changeEvent(QEvent * event);