diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2019-06-14 11:14:18 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-06-14 11:14:18 +0200 |
commit | 0d8c80ad5daafc02030385da90c5a57182a5d4e5 (patch) | |
tree | 723a15b598d8c7396882a08af188edb17350d31a /gui/ecp5 | |
parent | 053bd48bef73668e5c7bdf84e826a996a519c5bb (diff) | |
download | nextpnr-0d8c80ad5daafc02030385da90c5a57182a5d4e5.tar.gz nextpnr-0d8c80ad5daafc02030385da90c5a57182a5d4e5.tar.bz2 nextpnr-0d8c80ad5daafc02030385da90c5a57182a5d4e5.zip |
gui for json write and proper statuses
Diffstat (limited to 'gui/ecp5')
-rw-r--r-- | gui/ecp5/mainwindow.cc | 11 | ||||
-rw-r--r-- | gui/ecp5/mainwindow.h | 3 |
2 files changed, 9 insertions, 5 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
diff --git a/gui/ecp5/mainwindow.h b/gui/ecp5/mainwindow.h index 186a7974..b47e7ec7 100644 --- a/gui/ecp5/mainwindow.h +++ b/gui/ecp5/mainwindow.h @@ -38,8 +38,7 @@ class MainWindow : public BaseMainWindow protected:
void onDisableActions() override;
- void onJsonLoaded() override;
- void onRouteFinished() override;
+ void onUpdateActions() override;
protected Q_SLOTS:
void new_proj() override;
|