Fix the grid2demand import, when repeatedly importing different files.

This commit is contained in:
Dustin Carlino 2021-04-15 08:58:21 -07:00
parent 292945c841
commit 5bcd2a5526

View File

@ -33,6 +33,9 @@ pub fn import(ctx: &mut EventCtx) -> Transition {
],
Box::new(|_, app, success, _| {
if success {
// Clear out the cached scenario. If we repeatedly use this import, the
// scenario name is always the same, but the file is changing.
app.primary.scenario = None;
Transition::Replace(SandboxMode::simple_new(
app,
GameplayMode::PlayScenario(