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
......@@ -258,6 +258,7 @@ void NodeInstanceServer::clearScene(const ClearSceneCommand &/*command*/)
void NodeInstanceServer::removeInstances(const RemoveInstancesCommand &command)
{
ServerNodeInstance oldState = activeStateInstance();
if (activeStateInstance().isValid())
activeStateInstance().deactivateState();
......@@ -265,9 +266,8 @@ void NodeInstanceServer::removeInstances(const RemoveInstancesCommand &command)
removeInstanceRelationsip(instanceId);
}
if (activeStateInstance().isValid())
activeStateInstance().activateState();
if (oldState.isValid())
oldState.activateState();
refreshBindings();
startRenderTimer();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment