forked from qt-creator/qt-creator
QmlDesigner: Fix mode switch crash
Task-number: QDS-8599 Change-Id: I4bebd2ff4f2ce93788743304ff335d118e23ce68 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
bf4a94d619
commit
8b1233c11e
@@ -136,7 +136,8 @@ NodeInstanceView::NodeInstanceView(ConnectionManagerInterface &connectionManager
|
||||
m_resetTimer.setSingleShot(true);
|
||||
m_resetTimer.setInterval(100);
|
||||
QObject::connect(&m_resetTimer, &QTimer::timeout, [this] {
|
||||
resetPuppet();
|
||||
if (isAttached())
|
||||
resetPuppet();
|
||||
});
|
||||
m_updateWatcherTimer.setSingleShot(true);
|
||||
m_updateWatcherTimer.setInterval(100);
|
||||
|
@@ -559,6 +559,7 @@ void AbstractView::resetView()
|
||||
|
||||
void AbstractView::resetPuppet()
|
||||
{
|
||||
QTC_ASSERT(isAttached(), return);
|
||||
emitCustomNotification(QStringLiteral("reset QmlPuppet"));
|
||||
}
|
||||
|
||||
@@ -689,7 +690,8 @@ void AbstractView::emitCustomNotification(const QString &identifier, const QList
|
||||
|
||||
void AbstractView::emitCustomNotification(const QString &identifier, const QList<ModelNode> &nodeList, const QList<QVariant> &data)
|
||||
{
|
||||
model()->d->notifyCustomNotification(this, identifier, nodeList, data);
|
||||
if (model())
|
||||
model()->d->notifyCustomNotification(this, identifier, nodeList, data);
|
||||
}
|
||||
|
||||
void AbstractView::emitInstancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList)
|
||||
|
Reference in New Issue
Block a user