QmlDesigner: Reset property editor if root node type changes

This was not an issue before, because it was not possible in the ui.

Change-Id: I98e0634bdb667dae5a8589c5b1f70c2d87527ae6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2017-01-04 17:21:38 +01:00
parent c27d7c00d6
commit 78dbc9fc9e

View File

@@ -385,7 +385,7 @@ void PropertyEditorView::setupPanes()
void PropertyEditorView::delayedResetView()
{
if (m_timerId == 0)
m_timerId = startTimer(100);
m_timerId = startTimer(50);
}
void PropertyEditorView::timerEvent(QTimerEvent *timerEvent)
@@ -717,7 +717,7 @@ void PropertyEditorView::instancePropertyChanged(const QList<QPair<ModelNode, Pr
void PropertyEditorView::rootNodeTypeChanged(const QString &/*type*/, int /*majorVersion*/, int /*minorVersion*/)
{
// TODO: we should react to this case
delayedResetView();
}
void PropertyEditorView::nodeTypeChanged(const ModelNode &node, const TypeName &, int, int)