aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp')
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
index 345ef1227b..96fc80810d 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
@@ -264,6 +264,8 @@ void StatesEditorView::nodeAboutToBeRemoved(const ModelNode &removedNode)
m_lastIndex = propertyParent.indexOf(removedNode);
}
}
+ if (removedNode == currentState())
+ setCurrentState(baseState());
}
void StatesEditorView::nodeRemoved(const ModelNode & /*removedNode*/, const NodeAbstractProperty &parentProperty, PropertyChangeFlags /*propertyChange*/)