Commit a796dca9 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.model: avoid assert when setting current state (again)

Task-number: QTCREATORBUG-5503
Change-Id: Ib6469b584e82f6b0cb579d5ab81658f918fd8690
Reviewed-on: http://codereview.qt.nokia.com/1877

Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent b3642fd3
......@@ -96,6 +96,7 @@ ModelPrivate::ModelPrivate(Model *model) :
m_internalIdCounter(1)
{
m_rootInternalNode = createNode("QtQuick/Item", 1, 0, PropertyListType(), PropertyListType(), QString(), ModelNode::NodeWithoutSource,true);
m_acutalStateNode = m_rootInternalNode;
}
ModelPrivate::~ModelPrivate()
......
......@@ -63,6 +63,10 @@ void QmlModelView::setCurrentState(const QmlModelState &state)
if (!state.isValid())
return;
if (!model())
return;
if (actualStateNode() != state.modelNode())
setAcutalStateNode(state.modelNode());
}
......
Supports Markdown
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