From 7ab1364803e0134f31f567bfeb2ccbdee07ecfce Mon Sep 17 00:00:00 2001 From: maelstrom Date: Tue, 10 Jun 2025 21:07:18 +0200 Subject: [PATCH] fix(editor): deselect objects on run/stop --- editor/placedocument.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/placedocument.cpp b/editor/placedocument.cpp index 4dbe88a..f20b4f0 100644 --- a/editor/placedocument.cpp +++ b/editor/placedocument.cpp @@ -41,13 +41,15 @@ void PlaceDocument::setRunState(RunState newState) { std::shared_ptr newModel = editModeDataModel->CloneModel(); gDataModel = newModel; gDataModel->Init(true); + setSelection({}); } else if (newState == RUN_PAUSED && _runState == RUN_RUNNING) { _runState = RUN_PAUSED; } else if (newState == RUN_STOPPED) { _runState = RUN_STOPPED; - // GC: Check to make sure gDataModel gets properly garbage collected prior to this + // TODO: GC: Check to make sure gDataModel gets properly garbage collected prior to this gDataModel = editModeDataModel; + setSelection({}); } }