forked from qt-creator/qt-creator
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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user