[graphics/krita] plugins/dockers/textproperties/qml: Fix font family drop down not working on qt 6.11
Dmitry Kazakov <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 59e637e4176c7c34d44f1ea013d84815f9163c7e by Dmitry Kazakov, on behalf of Luna Lovecraft.
Committed on 31/07/2026 at 07:42.
Pushed by dkazakov into branch 'master'.
Fix font family drop down not working on qt 6.11
In Qt 6.11 changing an element of an array no longer calls onChanged
for that array, so we force update it instead
BUG:520971
M +6 -2 plugins/dockers/textproperties/qml/FontFamily.qml
https://invent.kde.org/graphics/krita/-/commit/59e637e4176c7c34d44f1ea013d84815f9163c7e
diff --git a/plugins/dockers/textproperties/qml/FontFamily.qml b/plugins/dockers/textproperties/qml/FontFamily.qml
index a69c132500e..729ae045375 100644
--- a/plugins/dockers/textproperties/qml/FontFamily.qml
+++ b/plugins/dockers/textproperties/qml/FontFamily.qml
@@ -81,10 +81,14 @@ CollapsibleGroupProperty {
Layout.fillWidth: true;
locales: root.locales;
onActivated: {
- if (fontFamilies.length >0) {
+ if (fontFamilies.length > 0) {
fontFamilies[0] = resourceName;
+
+ //Force update font families, as changing an element in an array no longer calls onChanged
+ fontFamilies = [fontFamilies];
+
} else {
- fontFamilies = [ resourceName ];
+ fontFamilies = [resourceName];
}
}
function updateCurrentIndex() {