diff options
author | Miodrag Milanović <mmicko@gmail.com> | 2020-09-04 17:29:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 17:29:43 +0200 |
commit | 48cd40773abb43adf8fa954c7483dc15c492be84 (patch) | |
tree | 10c99d2475700e3e98010c8bb50009cfa69a5e2e /common/command.cc | |
parent | 4512a9de19751916c466ed12a2ba4dce958d77bc (diff) | |
parent | 717bcfa19eb6d6351c471b657312097ad1261da5 (diff) | |
download | nextpnr-48cd40773abb43adf8fa954c7483dc15c492be84.tar.gz nextpnr-48cd40773abb43adf8fa954c7483dc15c492be84.tar.bz2 nextpnr-48cd40773abb43adf8fa954c7483dc15c492be84.zip |
Merge pull request #496 from YosysHQ/gui_fix
Preserve cmd parameters when loading json from GUI
Diffstat (limited to 'common/command.cc')
-rw-r--r-- | common/command.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/command.cc b/common/command.cc index f0d028ce..cad89c02 100644 --- a/common/command.cc +++ b/common/command.cc @@ -430,7 +430,6 @@ int CommandHandler::exec() std::unique_ptr<Context> CommandHandler::load_json(std::string filename) { - vm.clear(); std::unordered_map<std::string, Property> values; std::unique_ptr<Context> ctx = createContext(values); setupContext(ctx.get()); @@ -444,6 +443,11 @@ std::unique_ptr<Context> CommandHandler::load_json(std::string filename) return ctx; } +void CommandHandler::clear() +{ + vm.clear(); +} + void CommandHandler::run_script_hook(const std::string &name) { #ifndef NO_PYTHON |