QmlDesigner: Do not update instantly after creating component

If the update happens instantly the new component is not
parsed in sone cases, yet.

Change-Id: Ib43fc5e3dfd2e14f87a9e4fb46b1e2ba720768a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2022-02-08 19:11:09 +01:00
parent 4c7a5b07c1
commit 9e0b7a0d60

View File

@@ -1041,12 +1041,9 @@ void RewriterView::moveToComponent(const ModelNode &modelNode)
{ {
int offset = nodeOffset(modelNode); int offset = nodeOffset(modelNode);
bool instant = m_instantQmlTextUpdate;
m_instantQmlTextUpdate = true;
textModifier()->moveToComponent(offset); textModifier()->moveToComponent(offset);
m_instantQmlTextUpdate = instant;
} }
QStringList RewriterView::autoComplete(const QString &text, int pos, bool explicitComplete) QStringList RewriterView::autoComplete(const QString &text, int pos, bool explicitComplete)