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({}); } }