forked from qt-creator/qt-creator
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:
committed by
Henning Gründl
parent
9018a7bc20
commit
6cb3e6ec9d
@@ -238,9 +238,7 @@ Rectangle {
|
|||||||
anchors.right: annotations.left
|
anchors.right: annotations.left
|
||||||
anchors.rightMargin: 10
|
anchors.rightMargin: 10
|
||||||
visible: !root.flyoutEnabled
|
visible: !root.flyoutEnabled
|
||||||
model: WorkspaceModel {
|
model: WorkspaceModel { id: workspaceModel }
|
||||||
id: workspaceModel
|
|
||||||
}
|
|
||||||
textRole: "displayName"
|
textRole: "displayName"
|
||||||
valueRole: "fileName"
|
valueRole: "fileName"
|
||||||
suffix: qsTr(" Workspace")
|
suffix: qsTr(" Workspace")
|
||||||
@@ -249,6 +247,7 @@ Rectangle {
|
|||||||
|
|
||||||
onCurrentWorkspaceIndexChanged: workspaces.currentIndex = workspaces.currentWorkspaceIndex
|
onCurrentWorkspaceIndexChanged: workspaces.currentIndex = workspaces.currentWorkspaceIndex
|
||||||
onActivated: backend.setCurrentWorkspace(workspaces.currentValue)
|
onActivated: backend.setCurrentWorkspace(workspaces.currentValue)
|
||||||
|
onCountChanged: workspaces.currentIndex = workspaces.indexOfValue(backend.currentWorkspace)
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
|
|||||||
Reference in New Issue
Block a user