Skip to content
Snippets Groups Projects
Commit b099ab92 authored by Thomas Hartmann's avatar Thomas Hartmann Committed by Tim Jenssen
Browse files

QmlDesigner.PropertyEditor: Fixing url editor


Task-number: QTCREATORBUG-11380
Change-Id: I00cdcc8626e2e178b9fff8d11b26f87d9aad03a8
Reviewed-by: default avatarTim Jenssen <tim.jenssen@qt.io>
parent 29c58eab
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ RowLayout { ...@@ -56,7 +56,7 @@ RowLayout {
x: 2 x: 2
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
backendValue: urlChooser.backendValue backendValue: urlChooser.backendValue
visible: comboBox.enabled visible: urlChooser.enabled
} }
property bool isComplete: false property bool isComplete: false
...@@ -92,16 +92,25 @@ RowLayout { ...@@ -92,16 +92,25 @@ RowLayout {
setCurrentText(textValue) setCurrentText(textValue)
} }
onAccepted: {
if (!comboBox.isComplete)
return;
if (backendValue.value !== currentText)
backendValue.value = currentText;
}
onCurrentTextChanged: { onActivated: {
var cText = textAt(index)
print(cText)
if (backendValue === undefined) if (backendValue === undefined)
return; return;
if (!comboBox.isComplete) if (!comboBox.isComplete)
return; return;
if (backendValue.value !== currentText) if (backendValue.value !== cText)
backendValue.value = currentText; backendValue.value = cText;
} }
Component.onCompleted: { Component.onCompleted: {
...@@ -158,6 +167,7 @@ RowLayout { ...@@ -158,6 +167,7 @@ RowLayout {
onClicked: { onClicked: {
darkPanel.opacity = 1 darkPanel.opacity = 1
fileModel.openFileDialog() fileModel.openFileDialog()
if (fileModel.fileName != "")
backendValue.value = fileModel.fileName backendValue.value = fileModel.fileName
darkPanel.opacity = 0 darkPanel.opacity = 0
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment