Commit 8dc0e32f authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.statesEditor: fix thumbnail drawing code

Before this patch the thumbnail drawing  triggered global
state changes.

Reviewed-by: Marco Bubke
parent 68d032b6
......@@ -78,8 +78,13 @@ void StatesEditorView::setCurrentStateSilent(int index)
m_settingSilentState = false;
return;
}
nodeInstanceView()->setBlockStatePropertyChanges(true);
QmlModelView::activateState(state);
nodeInstanceView()->setBlockStatePropertyChanges(false);
m_settingSilentState = false;
}
......
......@@ -385,9 +385,12 @@ void QmlModelView::activateState(const QmlModelState &state)
return;
if (m_state == state)
return;
return;
m_state = state; //This is hacky. m_state should be controlled by the instances
//### todo: If the state thumbnail code gets refactored.
// this is not neccessary anymore.
QmlModelState oldState = m_state;
NodeInstance newStateInstance = instanceForModelNode(state.modelNode());
......
Markdown is supported
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