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 crash on new vector layer after session switch.
Wolthera van Hövell tot Westerflier7cae000090e6
diff --git a/plugins/tools/defaulttool/defaulttool/DefaultTool.cpp b/plugins/tools/defaulttool/defaulttool/DefaultTool.cppindex e5d98a3e3c..eee278aa17 100644--- a/plugins/tools/defaulttool/defaulttool/DefaultTool.cpp+++ b/plugins/tools/defaulttool/defaulttool/DefaultTool.cpp@@ -832,7 +832,10 @@ void DefaultTool::setupActions()textTypeActions->addAction(action("text_type_preformatted"));textTypeActions->addAction(action("text_type_inline_wrap"));textTypeActions->addAction(action("text_type_pre_positioned"));- textTypeActions->setExclusive(true);+ textTypeActions->setExclusive(false);+ Q_FOREACH (QAction *a, textTypeActions->actions()) {+ a->setCheckable(false);+ }}m_textFlowSignalsMapper = new KisSignalMapper(this);@@ -2216,10 +2219,8 @@ void DefaultTool::updateDistinctiveActions(const QList<KoShape*> &editableShapes}}QActionGroup *group = action("text_type_preformatted")->actionGroup();- group->setEnabled(true);- group->setExclusive(false);- Q_FOREACH (QAction *a, group->actions()) {- a->setCheckable(false);+ if (group) {+ group->setEnabled(text);}action("text_type_preformatted")->setEnabled(enablePreformatted);