diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2018-07-13 12:02:49 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2018-07-13 12:02:49 +0200 |
commit | b5498c8a5366f8ae6c1e6e850a55b49753b0d6a6 (patch) | |
tree | a2812f6315e2078bc472a97f3726191018689db4 | |
parent | 0f0259fd9467cf99f1ecc02887d9f8ce7f1427d6 (diff) | |
download | nextpnr-b5498c8a5366f8ae6c1e6e850a55b49753b0d6a6.tar.gz nextpnr-b5498c8a5366f8ae6c1e6e850a55b49753b0d6a6.tar.bz2 nextpnr-b5498c8a5366f8ae6c1e6e850a55b49753b0d6a6.zip |
Fixed initial title and actions after new
-rw-r--r-- | gui/ice40/mainwindow.cc | 5 | ||||
-rw-r--r-- | gui/ice40/mainwindow.h | 2 | ||||
-rw-r--r-- | ice40/main.cc | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/gui/ice40/mainwindow.cc b/gui/ice40/mainwindow.cc index e8476fcf..b7f08104 100644 --- a/gui/ice40/mainwindow.cc +++ b/gui/ice40/mainwindow.cc @@ -34,8 +34,8 @@ static void initMainResource() { Q_INIT_RESOURCE(nextpnr); } NEXTPNR_NAMESPACE_BEGIN
-MainWindow::MainWindow(std::unique_ptr<Context> context, QWidget *parent)
- : BaseMainWindow(std::move(context), parent), timing_driven(false)
+MainWindow::MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent)
+ : BaseMainWindow(std::move(context), parent), timing_driven(false), chipArgs(args)
{
initMainResource();
@@ -245,6 +245,7 @@ void MainWindow::new_proj() preload_pcf = "";
chipArgs.package = package.toStdString().c_str();
ctx = std::unique_ptr<Context>(new Context(chipArgs));
+ actionLoadJSON->setEnabled(true);
Q_EMIT contextChanged(ctx.get());
}
diff --git a/gui/ice40/mainwindow.h b/gui/ice40/mainwindow.h index 2bed925f..cfd938f8 100644 --- a/gui/ice40/mainwindow.h +++ b/gui/ice40/mainwindow.h @@ -30,7 +30,7 @@ class MainWindow : public BaseMainWindow Q_OBJECT
public:
- explicit MainWindow(std::unique_ptr<Context> context, QWidget *parent = 0);
+ explicit MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent = 0);
virtual ~MainWindow();
public:
diff --git a/ice40/main.cc b/ice40/main.cc index ae988da9..53cd7164 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -357,7 +357,7 @@ int main(int argc, char *argv[]) #ifndef NO_GUI if (vm.count("gui")) { Application a(argc, argv); - MainWindow w(std::move(ctx)); + MainWindow w(std::move(ctx), chipArgs); if (vm.count("json")) { std::string filename = vm["json"].as<std::string>(); std::string pcf = ""; |