forked from qt-creator/qt-creator
QmlDesigner: Properly react to deleted properties in ConnectionView
If the property contained a node we reset the model. Task-number: QTCREATORBUG-25437 Change-Id: If7efebed87fe2936069a06e2bd03193806427a97 Reviewed-by: Aleksei German <aleksei.german@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -102,7 +102,15 @@ void ConnectionView::nodeIdChanged(const ModelNode & /*node*/, const QString & /
|
||||
dynamicPropertiesModel()->resetModel();
|
||||
}
|
||||
|
||||
void ConnectionView::propertiesAboutToBeRemoved(const QList<AbstractProperty> & propertyList)
|
||||
void ConnectionView::propertiesRemoved(const QList<AbstractProperty> &propertyList)
|
||||
{
|
||||
for (const AbstractProperty &property : propertyList) {
|
||||
if (property.isDefaultProperty())
|
||||
connectionModel()->resetModel();
|
||||
}
|
||||
}
|
||||
|
||||
void ConnectionView::propertiesAboutToBeRemoved(const QList<AbstractProperty> &propertyList)
|
||||
{
|
||||
foreach (const AbstractProperty &property, propertyList) {
|
||||
if (property.isBindingProperty()) {
|
||||
|
||||
@@ -62,6 +62,7 @@ public:
|
||||
void nodeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent,
|
||||
const NodeAbstractProperty &oldPropertyParent, AbstractView::PropertyChangeFlags propertyChange) override;
|
||||
void nodeIdChanged(const ModelNode& node, const QString& newId, const QString& oldId) override;
|
||||
void propertiesRemoved(const QList<AbstractProperty> &propertyList) override;
|
||||
void propertiesAboutToBeRemoved(const QList<AbstractProperty>& propertyList) override;
|
||||
void variantPropertiesChanged(const QList<VariantProperty>& propertyList, PropertyChangeFlags propertyChange) override;
|
||||
void bindingPropertiesChanged(const QList<BindingProperty>& propertyList, PropertyChangeFlags propertyChange) override;
|
||||
|
||||
Reference in New Issue
Block a user