From 6744c8e081cf0168fa734864ee248c7dd2630374 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 11 Sep 2023 12:55:41 +0200 Subject: [PATCH] QmlDesigner: Move update to extra function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I66cfef4ecbc1276b816fcd8397a67e8a99039813 Reviewed-by: Henning Gründl --- .../components/connectioneditor/connectionmodel.cpp | 7 +++++-- .../components/connectioneditor/connectionmodel.h | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp index 09ea8f70d88..242347be194 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp +++ b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp @@ -765,9 +765,12 @@ void ConnectionModelBackendDelegate::setCurrentRow(int i) //setup - ConnectionModel *model = qobject_cast(parent()); + update(); +} - qDebug() << Q_FUNC_INFO << i << model; +void ConnectionModelBackendDelegate::update() +{ + ConnectionModel *model = qobject_cast(parent()); QTC_ASSERT(model, return ); if (!model->connectionView()->isAttached()) diff --git a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.h b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.h index 59b92a405e9..850447de654 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.h +++ b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.h @@ -270,6 +270,8 @@ public: Q_INVOKABLE void addElse(); Q_INVOKABLE void removeElse(); + void update(); + signals: void currentRowChanged(); void actionTypeChanged();