forked from qt-creator/qt-creator
QmlDesigner: Fix Connection editor closing
Task-number: QDS-12013
Change-Id: I8add3418bb43b87e45153c012353646833413664
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
(cherry picked from commit e86814c491
)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
committed by
Henning Gründl
parent
97bab8fa6a
commit
d767bfde4d
@@ -11,6 +11,8 @@ StudioControls.PopupDialog {
|
|||||||
|
|
||||||
property alias backend: form.backend
|
property alias backend: form.backend
|
||||||
|
|
||||||
|
keepOpen: form.keepOpen
|
||||||
|
|
||||||
titleBar: Row {
|
titleBar: Row {
|
||||||
spacing: 30 // TODO
|
spacing: 30 // TODO
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -43,6 +45,8 @@ StudioControls.PopupDialog {
|
|||||||
ConnectionsDialogForm {
|
ConnectionsDialogForm {
|
||||||
id: form
|
id: form
|
||||||
|
|
||||||
|
parentWindow: root.window
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: root.backend
|
target: root.backend
|
||||||
function onPopupShouldClose() {
|
function onPopupShouldClose() {
|
||||||
|
@@ -16,6 +16,9 @@ Column {
|
|||||||
|
|
||||||
property var backend
|
property var backend
|
||||||
|
|
||||||
|
property bool keepOpen: expressionDialogLoader.visible
|
||||||
|
property Window parentWindow: null
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: root.verticalSpacing
|
spacing: root.verticalSpacing
|
||||||
|
|
||||||
@@ -267,10 +270,8 @@ Column {
|
|||||||
horizontalAlignment: code.lineCount === 1 ? Text.AlignHCenter : Text.AlignLeft
|
horizontalAlignment: code.lineCount === 1 ? Text.AlignHCenter : Text.AlignLeft
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: expressionDialogLoader
|
id: expressionDialogLoader
|
||||||
parent: editor
|
parent: editor
|
||||||
@@ -297,19 +298,19 @@ Column {
|
|||||||
id: bindingEditor
|
id: bindingEditor
|
||||||
|
|
||||||
onRejected: {
|
onRejected: {
|
||||||
hideWidget()
|
bindingEditor.hideWidget()
|
||||||
expressionDialogLoader.visible = false
|
expressionDialogLoader.visible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
backend.setNewSource(bindingEditor.text)
|
backend.setNewSource(bindingEditor.text)
|
||||||
hideWidget()
|
bindingEditor.hideWidget()
|
||||||
expressionDialogLoader.visible = false
|
expressionDialogLoader.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // loader
|
}
|
||||||
} // rect
|
}
|
||||||
} //col 2
|
}
|
||||||
}//col1
|
}
|
||||||
|
|
||||||
|
@@ -104,7 +104,7 @@ QtObject {
|
|||||||
return root.maximumHeight + (2 * window.margin)
|
return root.maximumHeight + (2 * window.margin)
|
||||||
}
|
}
|
||||||
visible: false
|
visible: false
|
||||||
flags: Qt.FramelessWindowHint | Qt.Tool | Qt.WindowStaysOnTopHint
|
flags: Qt.FramelessWindowHint | Qt.Tool
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
onClosing: function (close) {
|
onClosing: function (close) {
|
||||||
@@ -286,10 +286,8 @@ QtObject {
|
|||||||
enabled: root.visible
|
enabled: root.visible
|
||||||
|
|
||||||
function onFocusWindowChanged(focusWindow) {
|
function onFocusWindowChanged(focusWindow) {
|
||||||
if (!focusWindow) {
|
if (!focusWindow)
|
||||||
root.close()
|
|
||||||
return
|
return
|
||||||
}
|
|
||||||
|
|
||||||
if (root.keepOpen)
|
if (root.keepOpen)
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user