Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Fix crashes when selecting text tool after some actions
Gregg Jansen van Vurena4350e5c4669
diff --git a/plugins/tools/svgtexttool/SvgTextTool.cpp b/plugins/tools/svgtexttool/SvgTextTool.cppindex c5f78386e9..95d89e34c5 100644--- a/plugins/tools/svgtexttool/SvgTextTool.cpp+++ b/plugins/tools/svgtexttool/SvgTextTool.cpp@@ -573,9 +573,9 @@ void SvgTextTool::slotTextTypeUpdated()QActionGroup *typeConvertGroup = action("text_type_preformatted")->actionGroup();if (typeConvertGroup) {typeConvertGroup->setExclusive(true);- }- Q_FOREACH (QAction *a, typeConvertGroup->actions()) {- a->setCheckable(true);+ Q_FOREACH (QAction *a, typeConvertGroup->actions()) {+ a->setCheckable(true);+ }}if (m_optionManager) {if (shape) {@@ -594,7 +594,10 @@ void SvgTextTool::slotTextTypeUpdated()}}const bool enableTypeSetting = (m_optionManager->typeSettingMode() && shape && (shape->textType() == KoSvgTextShape::PreformattedText ||shape->textType() == KoSvgTextShape::PrePositionedText));- action("svg_type_setting_move_selection_start_down_1_px")->actionGroup()->setEnabled(enableTypeSetting);+ QActionGroup *svgTypeSettingGroup = action("svg_type_setting_move_selection_start_down_1_px")->actionGroup();+ if (svgTypeSettingGroup) {+ svgTypeSettingGroup->setEnabled(enableTypeSetting);+ }m_textCursor.updateTypeSettingDecorFromShape();}}