[office/calligra] plugins/textshape: TextTool: Read stored FontFamily property

Carl Schwan <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit db062adc44c672c014c8128e2555c4ce968ca0b8 by Carl Schwan, on behalf of Lokesh Sarkar.
Committed on 02/08/2026 at 16:38.
Pushed by carlschwan into branch 'master'.

TextTool: Read stored FontFamily property

Read the stored FontFamily property directly when available instead of
relying solely on QTextCharFormat::font(), which does not reliably
resolve the stored font family when only the legacy FontFamily property
is set.

M  +1    -1    plugins/textshape/TextTool.cpp

https://invent.kde.org/office/calligra/-/commit/db062adc44c672c014c8128e2555c4ce968ca0b8

diff --git a/plugins/textshape/TextTool.cpp b/plugins/textshape/TextTool.cpp
index bb82e7b90c5..9c4707e77bf 100644
--- a/plugins/textshape/TextTool.cpp
+++ b/plugins/textshape/TextTool.cpp
@@ -1910,7 +1910,7 @@ void TextTool::updateActions()
     m_actionFormatSuper->setChecked(super);
     m_actionFormatSub->setChecked(sub);
     m_actionFormatFontSize->setFontSize(cf.font().pointSizeF());
-    m_actionFormatFontFamily->setFont(cf.font().family());
+    m_actionFormatFontFamily->setFont(cf.hasProperty(QTextFormat::FontFamily) ? cf.property(QTextFormat::FontFamily).toString() : cf.font().family());
 
     KoTextShapeData::ResizeMethod resizemethod = KoTextShapeData::AutoResize;
     if (m_textShapeData) {
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.