QmlDesigner: Always test if there is a instance for an id or object

Change-Id: I90ff8861de8879e300932bd61afb29f8ec3b9fc4
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
Marco Bubke
2014-07-02 14:33:15 +02:00
parent 7178a4740f
commit 5c551932b4
10 changed files with 85 additions and 56 deletions

View File

@@ -64,12 +64,13 @@ QmlStateNodeInstance::Pointer
void QmlStateNodeInstance::activateState()
{
if (stateGroup()) {
if (!isStateActive()) {
nodeInstanceServer()->setStateInstance(nodeInstanceServer()->instanceForObject(object()));
stateGroup()->setState(property("name").toString());
}
if (stateGroup()
&& !isStateActive()
&& nodeInstanceServer()->hasInstanceForObject(object())) {
nodeInstanceServer()->setStateInstance(nodeInstanceServer()->instanceForObject(object()));
stateGroup()->setState(property("name").toString());
}
}
void QmlStateNodeInstance::deactivateState()