Skip to content
Snippets Groups Projects
Commit e828c425 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.nodeInstances: bugfix for state editing

The state activeStateInstance() was always invalid as a side effect
of calling deactivateState() before.

So we always changed back to the base state when removing an item.

Reviewed-by: Kai Koehne
parent e8984f09
No related branches found
No related tags found
No related merge requests found
...@@ -258,6 +258,7 @@ void NodeInstanceServer::clearScene(const ClearSceneCommand &/*command*/) ...@@ -258,6 +258,7 @@ void NodeInstanceServer::clearScene(const ClearSceneCommand &/*command*/)
void NodeInstanceServer::removeInstances(const RemoveInstancesCommand &command) void NodeInstanceServer::removeInstances(const RemoveInstancesCommand &command)
{ {
ServerNodeInstance oldState = activeStateInstance();
if (activeStateInstance().isValid()) if (activeStateInstance().isValid())
activeStateInstance().deactivateState(); activeStateInstance().deactivateState();
...@@ -265,9 +266,8 @@ void NodeInstanceServer::removeInstances(const RemoveInstancesCommand &command) ...@@ -265,9 +266,8 @@ void NodeInstanceServer::removeInstances(const RemoveInstancesCommand &command)
removeInstanceRelationsip(instanceId); removeInstanceRelationsip(instanceId);
} }
if (activeStateInstance().isValid()) if (oldState.isValid())
activeStateInstance().activateState(); oldState.activateState();
refreshBindings(); refreshBindings();
startRenderTimer(); startRenderTimer();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment