diff options
author | Shrief Gabr <shrief.gabr@qt.io> | 2024-04-17 10:34:17 +0300 |
---|---|---|
committer | Shrief Gabr <shrief.gabr@qt.io> | 2024-04-22 12:48:04 +0000 |
commit | dad555a088062f585e2c15370d8fe8963801358e (patch) | |
tree | 97baa90bd7bd759f4d8ade2492f50d8fb542d411 /share/qtcreator | |
parent | 1d66a5585942a71613031d8a159ff71996181258 (diff) |
QmlDesigner: Fix save indicator behavior on selection change
Task-number: QDS-12499
Change-Id: If91aab8d133a9269d9fc381ea0a130d3953aa69d
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Diffstat (limited to 'share/qtcreator')
-rw-r--r-- | share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsToolbar.qml | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsToolbar.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsToolbar.qml index 852341b9d5..e7997f7eae 100644 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsToolbar.qml +++ b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsToolbar.qml @@ -17,7 +17,6 @@ Rectangle { required property var model required property var backend property int selectedRow: -1 - property bool hasUnsavedChanges: false implicitHeight: StudioTheme.Values.toolbarHeight color: StudioTheme.Values.themeToolbarBackground @@ -35,14 +34,6 @@ Rectangle { fileDialog.reject() } - Connections { - target: root.model - - function onDataChanged() { - hasUnsavedChanges = true - } - } - RowLayout { id: container @@ -131,8 +122,8 @@ Rectangle { buttonIcon: StudioTheme.Constants.save_medium tooltip: qsTr("Save changes") - enabled: root.model.collectionName !== "" && root.hasUnsavedChanges - onClicked: hasUnsavedChanges = !root.model.saveDataStoreCollections() + enabled: root.model.collectionName !== "" && root.model.hasUnsavedChanges + onClicked: root.model.saveDataStoreCollections() Rectangle { width: StudioTheme.Values.smallStatusIndicatorDiameter @@ -140,7 +131,7 @@ Rectangle { radius: StudioTheme.Values.smallStatusIndicatorDiameter / 2 anchors.right: parent.right anchors.top: parent.top - visible: hasUnsavedChanges + visible: root.model.hasUnsavedChanges color: StudioTheme.Values.themeIconColorSelected } } |