fix(editor): deselect objects on run/stop

This commit is contained in:
maelstrom 2025-06-10 21:07:18 +02:00
parent e51ed0c7c5
commit 7ab1364803

View file

@ -41,13 +41,15 @@ void PlaceDocument::setRunState(RunState newState) {
std::shared_ptr<DataModel> 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({});
}
}