forked from qt-creator/qt-creator
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 d61830f91f
)
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user