forked from qt-creator/qt-creator
QmlDesigner.PropertyEditor: Fixing url editor
Task-number: QTCREATORBUG-11380 Change-Id: I00cdcc8626e2e178b9fff8d11b26f87d9aad03a8 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
29c58eabed
commit
b099ab92d8
@@ -56,7 +56,7 @@ RowLayout {
|
||||
x: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
backendValue: urlChooser.backendValue
|
||||
visible: comboBox.enabled
|
||||
visible: urlChooser.enabled
|
||||
}
|
||||
|
||||
property bool isComplete: false
|
||||
@@ -92,16 +92,25 @@ RowLayout {
|
||||
|
||||
setCurrentText(textValue)
|
||||
}
|
||||
onAccepted: {
|
||||
if (!comboBox.isComplete)
|
||||
return;
|
||||
|
||||
onCurrentTextChanged: {
|
||||
if (backendValue.value !== currentText)
|
||||
backendValue.value = currentText;
|
||||
}
|
||||
|
||||
onActivated: {
|
||||
var cText = textAt(index)
|
||||
print(cText)
|
||||
if (backendValue === undefined)
|
||||
return;
|
||||
|
||||
if (!comboBox.isComplete)
|
||||
return;
|
||||
|
||||
if (backendValue.value !== currentText)
|
||||
backendValue.value = currentText;
|
||||
if (backendValue.value !== cText)
|
||||
backendValue.value = cText;
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
@@ -158,6 +167,7 @@ RowLayout {
|
||||
onClicked: {
|
||||
darkPanel.opacity = 1
|
||||
fileModel.openFileDialog()
|
||||
if (fileModel.fileName != "")
|
||||
backendValue.value = fileModel.fileName
|
||||
darkPanel.opacity = 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user