aboutsummaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-06-07 21:02:43 +0100
committergatecat <gatecat@ds0.me>2021-06-07 21:07:17 +0100
commit875004d300eb4b85e13c026378e39b31b6922f93 (patch)
treedcaa0f2265d32916578191b5c1ad9f5df104d59c /gui
parentd946cfd265fd137f71ffe40e540ec1d8e5451bd8 (diff)
downloadnextpnr-875004d300eb4b85e13c026378e39b31b6922f93.tar.gz
nextpnr-875004d300eb4b85e13c026378e39b31b6922f93.tar.bz2
nextpnr-875004d300eb4b85e13c026378e39b31b6922f93.zip
gui: Don't destroy context when loading JSON
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'gui')
-rw-r--r--gui/basewindow.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/basewindow.cc b/gui/basewindow.cc
index 08cbafe4..50eb2e52 100644
--- a/gui/basewindow.cc
+++ b/gui/basewindow.cc
@@ -30,6 +30,7 @@
#include <fstream>
#include "designwidget.h"
#include "fpgaviewwidget.h"
+#include "json_frontend.h"
#include "jsonwrite.h"
#include "log.h"
#include "mainwindow.h"
@@ -364,8 +365,7 @@ void BaseMainWindow::open_json()
QString fileName = QFileDialog::getOpenFileName(this, QString("Open JSON"), QString(), QString("*.json"));
if (!fileName.isEmpty()) {
disableActions();
- ctx = handler->load_json(fileName.toStdString());
- Q_EMIT contextChanged(ctx.get());
+ handler->load_json(ctx.get(), fileName.toStdString());
Q_EMIT updateTreeView();
log("Loading design successful.\n");
updateActions();