Skip to content
Snippets Groups Projects
Commit ed6d283c authored by Marco Bubke's avatar Marco Bubke Committed by Kai Koehne
Browse files

Fix state switch

parent 0f1d2610
No related branches found
No related tags found
No related merge requests found
...@@ -305,10 +305,7 @@ void QmlModelView::activateState(const QmlModelState &state) ...@@ -305,10 +305,7 @@ void QmlModelView::activateState(const QmlModelState &state)
} else { } else {
nodeInstanceView()->activateState(newStateInstance); nodeInstanceView()->activateState(newStateInstance);
} }
}
m_state = state;
stateChanged(state, oldState);}
void QmlModelView::changeToState(const ModelNode &node, const QString &stateName) void QmlModelView::changeToState(const ModelNode &node, const QString &stateName)
{ {
...@@ -323,7 +320,8 @@ void QmlModelView::changeToState(const ModelNode &node, const QString &stateName ...@@ -323,7 +320,8 @@ void QmlModelView::changeToState(const ModelNode &node, const QString &stateName
QmlModelState oldState = m_state; QmlModelState oldState = m_state;
if (newState.isValid() && oldState != newState) { if (newState.isValid() && oldState != newState) {
activateState(newState); m_state = newState;
stateChanged(newState, oldState);
} }
} }
...@@ -340,7 +338,7 @@ void QmlModelView::otherPropertyChanged(const QmlObjectNode &/*qmlObjectNode*/, ...@@ -340,7 +338,7 @@ void QmlModelView::otherPropertyChanged(const QmlObjectNode &/*qmlObjectNode*/,
{ {
} }
void QmlModelView::stateChanged(const QmlModelState &/*newQmlModelState*/, const QmlModelState &/*oldQmlModelState*/) void QmlModelView::stateChanged(const QmlModelState &newQmlModelState, const QmlModelState &/*oldQmlModelState*/)
{ {
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment