mirror of https://github.com/YosysHQ/nextpnr.git
Only delete old context after emitting context changed wiht new context when inporting json
This commit is contained in:
parent
9a4652e0f8
commit
c73affb3dc
|
|
@ -369,13 +369,14 @@ void BaseMainWindow::open_json()
|
|||
disableActions();
|
||||
if (ctx->settings.find(ctx->id("synth")) == ctx->settings.end()) {
|
||||
ArchArgs chipArgs = ctx->args;
|
||||
ctx = std::unique_ptr<Context>(new Context(chipArgs));
|
||||
std::unique_ptr<Context> new_ctx = std::unique_ptr<Context>(new Context(chipArgs));
|
||||
#ifdef ARCH_HIMBAECHEL
|
||||
ctx->uarch->with_gui = true;
|
||||
ctx->uarch->init(ctx.get());
|
||||
ctx->late_init();
|
||||
new_ctx->uarch->with_gui = true;
|
||||
new_ctx->uarch->init(new_ctx.get());
|
||||
new_ctx->late_init();
|
||||
#endif
|
||||
Q_EMIT contextChanged(ctx.get());
|
||||
Q_EMIT contextChanged(new_ctx.get());
|
||||
ctx = std::move(new_ctx);
|
||||
}
|
||||
handler->load_json(ctx.get(), fileName.toStdString());
|
||||
Q_EMIT updateTreeView();
|
||||
|
|
|
|||
Loading…
Reference in New Issue