fix(cpn): update main window menus and toolbars on fixing invalid models (#5890)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user