forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user