diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-09-22 16:30:21 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-09-22 16:30:21 -0700 |
commit | 28103e503af6ac4bedc28a721e9a67355e61d32e (patch) | |
tree | 5ebd8a6ff0f7fc867b42a9c8653742237af05da6 | |
parent | 093036e8a141547d9a16c6cd5383728a79dd1811 (diff) | |
download | mu-28103e503af6ac4bedc28a721e9a67355e61d32e.tar.gz |
3409
Support reloading the recipe side of the edit/ app when it includes type abbreviations. Thanks Ella Couch for reporting this problem.
-rw-r--r-- | 101run_sandboxed.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/101run_sandboxed.cc b/101run_sandboxed.cc index f15e4d2a..18d3eae0 100644 --- a/101run_sandboxed.cc +++ b/101run_sandboxed.cc @@ -134,6 +134,7 @@ map<string, type_ordinal> Type_ordinal_snapshot_stash; map<type_ordinal, type_info> Type_snapshot_stash; map<recipe_ordinal, map<string, int> > Name_snapshot_stash; map<string, vector<recipe_ordinal> > Recipe_variants_snapshot_stash; +map<string, type_tree*> Type_abbreviations_snapshot_stash; :(code) void run_code_begin(bool should_stash_snapshots) { @@ -176,6 +177,8 @@ void stash_snapshots() { Name_snapshot_stash = Name_snapshot; assert(Recipe_variants_snapshot_stash.empty()); Recipe_variants_snapshot_stash = Recipe_variants_snapshot; + assert(Type_abbreviations_snapshot_stash.empty()); + Type_abbreviations_snapshot_stash = Type_abbreviations_snapshot; save_snapshots(); } void unstash_snapshots() { @@ -186,6 +189,7 @@ void unstash_snapshots() { Type_snapshot = Type_snapshot_stash; Type_snapshot_stash.clear(); Name_snapshot = Name_snapshot_stash; Name_snapshot_stash.clear(); Recipe_variants_snapshot = Recipe_variants_snapshot_stash; Recipe_variants_snapshot_stash.clear(); + Type_abbreviations_snapshot = Type_abbreviations_snapshot_stash; Type_abbreviations_snapshot_stash.clear(); } :(before "End Load Recipes") |