diff options
Diffstat (limited to 'gui/ice40/mainwindow.cc')
-rw-r--r-- | gui/ice40/mainwindow.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gui/ice40/mainwindow.cc b/gui/ice40/mainwindow.cc index b766734f..7c8effac 100644 --- a/gui/ice40/mainwindow.cc +++ b/gui/ice40/mainwindow.cc @@ -186,7 +186,11 @@ void MainWindow::onDisableActions() actionSaveAsc->setEnabled(false);
}
-void MainWindow::onJsonLoaded() { actionLoadPCF->setEnabled(true); }
-void MainWindow::onRouteFinished() { actionSaveAsc->setEnabled(true); }
+void MainWindow::onUpdateActions() {
+ if (ctx->settings.find(ctx->id("pack"))==ctx->settings.end())
+ actionLoadPCF->setEnabled(true);
+ if (ctx->settings.find(ctx->id("route"))!=ctx->settings.end())
+ actionSaveAsc->setEnabled(true);
+}
NEXTPNR_NAMESPACE_END
|