[graphics/krita/krita/6.0] 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 986ae3c0b295e72003d2000fa74f288d1c5d6a28 by Dmitry Kazakov, on behalf of Luna Lovecraft.
Committed on 31/07/2026 at 07:43.
Pushed by dkazakov into branch 'krita/6.0'.

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/986ae3c0b295e72003d2000fa74f288d1c5d6a28

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() {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.