Commit 224f3eae authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner.NodeInstances: Revert to base state for every state change

This is a woukround and should be fixed later.
parent 5f04fbba
...@@ -209,6 +209,8 @@ void NodeInstanceServer::reparentInstances(const ReparentInstancesCommand &comma ...@@ -209,6 +209,8 @@ void NodeInstanceServer::reparentInstances(const ReparentInstancesCommand &comma
void NodeInstanceServer::changeState(const ChangeStateCommand &command) void NodeInstanceServer::changeState(const ChangeStateCommand &command)
{ {
if (hasInstanceForId(command.stateInstanceId())) { if (hasInstanceForId(command.stateInstanceId())) {
if (activeStateInstance().isValid())
activeStateInstance().deactivateState();
ServerNodeInstance instance = instanceForId(command.stateInstanceId()); ServerNodeInstance instance = instanceForId(command.stateInstanceId());
instance.activateState(); instance.activateState();
} else { } else {
......
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