From 61fb1da0b624ce20960c5e8b2229ca3d7f0e4fcd Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 6 Jan 2017 22:09:29 -0800 Subject: 3730 Properly support reloading lessons containing scenarios in edit/ and sandbox/ apps. I was so sure I tested this for commit 3724, but apparently not. --- 101run_sandboxed.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/101run_sandboxed.cc b/101run_sandboxed.cc index a3b6292e..d6680f0e 100644 --- a/101run_sandboxed.cc +++ b/101run_sandboxed.cc @@ -135,6 +135,8 @@ map Type_snapshot_stash; map > Name_snapshot_stash; map > Recipe_variants_snapshot_stash; map Type_abbreviations_snapshot_stash; +vector Scenarios_snapshot_stash; +set Scenario_names_snapshot_stash; :(code) void run_code_begin(bool should_stash_snapshots) { @@ -179,6 +181,10 @@ void stash_snapshots() { Recipe_variants_snapshot_stash = Recipe_variants_snapshot; assert(Type_abbreviations_snapshot_stash.empty()); Type_abbreviations_snapshot_stash = Type_abbreviations_snapshot; + assert(Scenarios_snapshot_stash.empty()); + Scenarios_snapshot_stash = Scenarios_snapshot; + assert(Scenario_names_snapshot_stash.empty()); + Scenario_names_snapshot_stash = Scenario_names_snapshot; save_snapshots(); } void unstash_snapshots() { @@ -190,6 +196,8 @@ void unstash_snapshots() { 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(); + Scenarios_snapshot = Scenarios_snapshot_stash; Scenarios_snapshot_stash.clear(); + Scenario_names_snapshot = Scenario_names_snapshot_stash; Scenario_names_snapshot_stash.clear(); } :(before "End Load Recipes") -- cgit 1.4.1-2-gfad0 hod='get' action='/akkartik/mu/log/.gitattributes'>
blob: 43b82e97691836391da6710e54414934e4a866e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11