forked from qt-creator/qt-creator
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:
@@ -385,7 +385,7 @@ void PropertyEditorView::setupPanes()
|
|||||||
void PropertyEditorView::delayedResetView()
|
void PropertyEditorView::delayedResetView()
|
||||||
{
|
{
|
||||||
if (m_timerId == 0)
|
if (m_timerId == 0)
|
||||||
m_timerId = startTimer(100);
|
m_timerId = startTimer(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertyEditorView::timerEvent(QTimerEvent *timerEvent)
|
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*/)
|
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)
|
void PropertyEditorView::nodeTypeChanged(const ModelNode &node, const TypeName &, int, int)
|
||||||
|
Reference in New Issue
Block a user