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
|
||||
|
||||
keepOpen: form.keepOpen
|
||||
|
||||
titleBar: Row {
|
||||
spacing: 30 // TODO
|
||||
anchors.fill: parent
|
||||
@@ -43,6 +45,8 @@ StudioControls.PopupDialog {
|
||||
ConnectionsDialogForm {
|
||||
id: form
|
||||
|
||||
parentWindow: root.window
|
||||
|
||||
Connections {
|
||||
target: root.backend
|
||||
function onPopupShouldClose() {
|
||||
|
@@ -16,6 +16,9 @@ Column {
|
||||
|
||||
property var backend
|
||||
|
||||
property bool keepOpen: expressionDialogLoader.visible
|
||||
property Window parentWindow: null
|
||||
|
||||
width: parent.width
|
||||
spacing: root.verticalSpacing
|
||||
|
||||
@@ -267,10 +270,8 @@ Column {
|
||||
horizontalAlignment: code.lineCount === 1 ? Text.AlignHCenter : Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loader {
|
||||
id: expressionDialogLoader
|
||||
parent: editor
|
||||
@@ -297,19 +298,19 @@ Column {
|
||||
id: bindingEditor
|
||||
|
||||
onRejected: {
|
||||
hideWidget()
|
||||
bindingEditor.hideWidget()
|
||||
expressionDialogLoader.visible = false
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
backend.setNewSource(bindingEditor.text)
|
||||
hideWidget()
|
||||
bindingEditor.hideWidget()
|
||||
expressionDialogLoader.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
} // loader
|
||||
} // rect
|
||||
} //col 2
|
||||
}//col1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -104,7 +104,7 @@ QtObject {
|
||||
return root.maximumHeight + (2 * window.margin)
|
||||
}
|
||||
visible: false
|
||||
flags: Qt.FramelessWindowHint | Qt.Tool | Qt.WindowStaysOnTopHint
|
||||
flags: Qt.FramelessWindowHint | Qt.Tool
|
||||
color: "transparent"
|
||||
|
||||
onClosing: function (close) {
|
||||
@@ -286,10 +286,8 @@ QtObject {
|
||||
enabled: root.visible
|
||||
|
||||
function onFocusWindowChanged(focusWindow) {
|
||||
if (!focusWindow) {
|
||||
root.close()
|
||||
if (!focusWindow)
|
||||
return
|
||||
}
|
||||
|
||||
if (root.keepOpen)
|
||||
return
|
||||
|
Reference in New Issue
Block a user