mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 23:15:24 +03:00
Fix the grid2demand import, when repeatedly importing different files.
This commit is contained in:
parent
292945c841
commit
5bcd2a5526
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user