diff options
Diffstat (limited to 'gui/ecp5/mainwindow.cc')
-rw-r--r-- | gui/ecp5/mainwindow.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gui/ecp5/mainwindow.cc b/gui/ecp5/mainwindow.cc index a54ab8b5..43b31f4c 100644 --- a/gui/ecp5/mainwindow.cc +++ b/gui/ecp5/mainwindow.cc @@ -188,8 +188,13 @@ void MainWindow::onDisableActions() actionSaveConfig->setEnabled(false);
}
-void MainWindow::onJsonLoaded() { actionLoadLPF->setEnabled(true); }
-
-void MainWindow::onRouteFinished() { actionLoadBase->setEnabled(true); }
+void MainWindow::onUpdateActions() {
+ if (ctx->settings.find(ctx->id("pack"))==ctx->settings.end())
+ actionLoadLPF->setEnabled(true);
+ if (ctx->settings.find(ctx->id("pack"))==ctx->settings.end())
+ actionLoadBase->setEnabled(true);
+ if (ctx->settings.find(ctx->id("route"))!=ctx->settings.end())
+ actionSaveConfig->setEnabled(true);
+}
NEXTPNR_NAMESPACE_END
|