QmlDesigner: Fix top toolbar workspace selection

Task-number: QDS-10494
Change-Id: I1f055f7bed7a76df76d733ff8d17e190485ab76d
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2023-08-22 11:05:50 +02:00
committed by Henning Gründl
parent 9018a7bc20
commit 6cb3e6ec9d

View File

@@ -238,9 +238,7 @@ Rectangle {
anchors.right: annotations.left
anchors.rightMargin: 10
visible: !root.flyoutEnabled
model: WorkspaceModel {
id: workspaceModel
}
model: WorkspaceModel { id: workspaceModel }
textRole: "displayName"
valueRole: "fileName"
suffix: qsTr(" Workspace")
@@ -249,6 +247,7 @@ Rectangle {
onCurrentWorkspaceIndexChanged: workspaces.currentIndex = workspaces.currentWorkspaceIndex
onActivated: backend.setCurrentWorkspace(workspaces.currentValue)
onCountChanged: workspaces.currentIndex = workspaces.indexOfValue(backend.currentWorkspace)
}
ToolbarButton {