aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Gruendl <henning.gruendl@qt.io>2021-12-08 17:42:09 +0100
committerHenning Gründl <henning.gruendl@qt.io>2021-12-08 19:01:26 +0000
commite1ecc23dacebea493957a3b85cf7fb6b0b7a4708 (patch)
tree0365f7c59a9fe60f8f865f129bccc370bb4194d0
parentefa8e9fd9a8ef60cb5a1fa3e254f2a16d2970c42 (diff)
QmlDesigner: Remove duplicate family names
Remove duplicate family names in the font ComboBox. Task-number: QDS-5695 Change-Id: I9f5bcf7f58dbcae012288689c0ec48a80451c328 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml
index 8294068ccf..61ffd0ce40 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml
@@ -60,6 +60,8 @@ StudioControls.ComboBox {
familyNames.push(fontLoader.name)
}
+ // Remove duplicate family names
+ familyNames = [...new Set(familyNames)]
familyNames.sort()
comboBox.model = familyNames
}