forked from qt-creator/qt-creator
QmlDesigner: Fix UrlChooser preview image
The path used to resolve image was not updated in case selection changed between two model nodes of the same type. Fixes: QDS-7694 Change-Id: Ibbb11be02140eb9aa67a734894041f9167d13fe4 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
@@ -76,6 +76,13 @@ Row {
|
||||
// when the combobox is closed by focusing on some other control.
|
||||
property int hoverIndex: -1
|
||||
|
||||
onCurrentIndexChanged: {
|
||||
// This is needed to correctly update root.absoluteFilePath in cases where selection
|
||||
// changes between two nodes of same type.
|
||||
if (currentIndex !== -1 && !root.backendValue.isBound)
|
||||
root.absoluteFilePath = fileModel.resolve(root.backendValue.value)
|
||||
}
|
||||
|
||||
DropArea {
|
||||
id: dropArea
|
||||
|
||||
|
Reference in New Issue
Block a user