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)
|
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)
|
|||||||
removeInstanceRelationsip(instanceId);
|
removeInstanceRelationsip(instanceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeStateInstance().isValid())
|
if (oldState.isValid())
|
||||||
activeStateInstance().activateState();
|
oldState.activateState();
|
||||||
|
|
||||||
|
|
||||||
refreshBindings();
|
refreshBindings();
|
||||||
startRenderTimer();
|
startRenderTimer();
|
||||||
|
Reference in New Issue
Block a user