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
|
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 {
|
|||||||
|
|
||||||
setCurrentText(textValue)
|
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)
|
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,7 +167,8 @@ RowLayout {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
darkPanel.opacity = 1
|
darkPanel.opacity = 1
|
||||||
fileModel.openFileDialog()
|
fileModel.openFileDialog()
|
||||||
backendValue.value = fileModel.fileName
|
if (fileModel.fileName != "")
|
||||||
|
backendValue.value = fileModel.fileName
|
||||||
darkPanel.opacity = 0
|
darkPanel.opacity = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user