summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2023-03-17 14:25:40 +0100
committerThomas Hartmann <thomas.hartmann@qt.io>2023-03-17 15:02:51 +0000
commitd3ae7235588d1288e34d56e7c690bdc137207291 (patch)
tree4833a09bc6de9a400131cb1346568b8b964cac7b
parent9f725de2837916bd87d26fb914eaa9a74b6ef616 (diff)
downloadqt-creator-d3ae7235588d1288e34d56e7c690bdc137207291.tar.gz
QmlDesigner: Fix TopLevelComboBoxes
The combobox will break bindings on current index. Therefore we cannot use a binding on the instances. Change-Id: I5b4ede02b8b945429b37efa4fc3e1acc15b3fbe7 (cherry picked from commit d61830f91f5a6060ab5eaa73e77a2fa9d7e0db35) Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/statusbar/Main.qml3
-rw-r--r--share/qtcreator/qmldesigner/toolbar/Main.qml7
2 files changed, 7 insertions, 3 deletions
diff --git a/share/qtcreator/qmldesigner/statusbar/Main.qml b/share/qtcreator/qmldesigner/statusbar/Main.qml
index 1310da45f6..db1a125e10 100644
--- a/share/qtcreator/qmldesigner/statusbar/Main.qml
+++ b/share/qtcreator/qmldesigner/statusbar/Main.qml
@@ -77,7 +77,8 @@ Item {
onActivated: backend.setCurrentStyle(styles.currentIndex)
openUpwards: true
enabled: backend.isInDesignMode
- currentIndex: backend.currentStyle
+ property int currentStyleIndex: backend.currentStyle
+ onCurrentStyleIndexChanged: currentIndex = backend.currentStyle
}
}
}
diff --git a/share/qtcreator/qmldesigner/toolbar/Main.qml b/share/qtcreator/qmldesigner/toolbar/Main.qml
index 8579c21a0b..69d85073b1 100644
--- a/share/qtcreator/qmldesigner/toolbar/Main.qml
+++ b/share/qtcreator/qmldesigner/toolbar/Main.qml
@@ -137,8 +137,9 @@ Rectangle {
anchors.left: livePreviewButton.right
anchors.leftMargin: 10
model: backend.documentModel
- currentIndex: backend.documentIndex
+ property int currentDocumentIndex: backend.documentIndex
+ onCurrentDocumentIndexChanged: currentFile.currentIndex = currentFile.currentDocumentIndex
onActivated: backend.openFileByIndex(index)
}
@@ -237,7 +238,9 @@ Rectangle {
anchors.right: annotations.left
anchors.rightMargin: 10
model: backend.workspaces
- currentIndex: workspaces.find(backend.currentWorkspace)
+ property int currentWorkspaceIndex: workspaces.find(backend.currentWorkspace)
+ onCurrentWorkspaceIndexChanged: workspaces.currentIndex = workspaces.currentWorkspaceIndex
+
visible: !root.flyoutEnabled
onActivated: backend.setCurrentWorkspace(workspaces.currentText)