Skip to content

Commit

Permalink
Reset lastFrameTime when starting a new scenario (#855)
Browse files Browse the repository at this point in the history
Fixes #853.
  • Loading branch information
byorgey authored Nov 13, 2022
1 parent 6237e1d commit e73a284
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Swarm/TUI/Model.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,8 @@ scenarioToAppState siPair@(scene, _) userSeed toRun = do

-- | Modify the UI state appropriately when starting a new scenario.
scenarioToUIState :: ScenarioInfoPair -> UIState -> IO UIState
scenarioToUIState siPair u =
scenarioToUIState siPair u = do
curTime <- getTime Monotonic
return $
u
& uiPlaying .~ True
Expand All @@ -1053,3 +1054,4 @@ scenarioToUIState siPair u =
& uiREPL .~ initREPLState (u ^. uiREPL . replHistory)
& uiREPL . replHistory %~ restartREPLHistory
& scenarioRef ?~ siPair
& lastFrameTime .~ curTime

0 comments on commit e73a284

Please sign in to comment.