QmlDesigner: Unify state handling on puppet reset

Form editor and 3D edit view changed state to base before issuing reset,
and form editor also changed it back to current state after issuing
reset, while all other resetPuppet calls do not change state.
Since puppet reset is asynchronous with small delay, the state changes
done by form editor did essentially nothing, and just changing to base
state in 3D edit view is wrong as we don't want reset to change the
state.

Removed state changes from puppet resets to unify the reset
functionality.

Fixes: QDS-8253
Change-Id: I33be3ec864ffb972010e25c2fb956695201db9ec
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Miikka Heikkinen
2022-11-15 11:53:39 +02:00
parent 4c468e79f7
commit eae9be4218
2 changed files with 0 additions and 5 deletions

View File

@@ -627,7 +627,6 @@ void Edit3DView::createEdit3DActions()
m_particlesPlayAction->action()->setChecked(true);
if (m_seeker)
m_seeker->setEnabled(false);
setCurrentStateNode(rootModelNode());
resetPuppet();
};
@@ -638,7 +637,6 @@ void Edit3DView::createEdit3DActions()
if (m_seeker)
m_seeker->setEnabled(false);
QmlDesignerPlugin::settings().insert("particleMode", particlemode);
setCurrentStateNode(rootModelNode());
resetPuppet();
};

View File

@@ -858,10 +858,7 @@ bool FormEditorView::isMoveToolAvailable() const
void FormEditorView::resetNodeInstanceView()
{
ModelNode currentStateNode = currentState().modelNode();
setCurrentStateNode(rootModelNode());
resetPuppet();
setCurrentStateNode(currentStateNode);
}
void FormEditorView::addOrRemoveFormEditorItem(const ModelNode &node)