diff options
-rw-r--r-- | share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml index 8c05fa2f87..2f087c3b29 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml @@ -65,9 +65,11 @@ StudioControls.ComboBox { onDropped: function(drop) { drop.accepted = root.hasActiveHoverDrag - var fontLoader = root.createFontLoader("file:///" + dropArea.assetPath) - root.backendValue.value = fontLoader.name - root.currentIndex = root.find(root.backendValue.value) + var fontLoader = root.createFontLoader("file:" + dropArea.assetPath) + if (fontLoader.status === FontLoader.Ready) { + root.backendValue.value = fontLoader.name + root.currentIndex = root.find(root.backendValue.value) + } root.hasActiveHoverDrag = false root.backendValue.commitDrop(dropArea.assetPath) } |