Git commit a957d083cdc1d586ccbd2ba4a972c7eac3dd1e11 by Dmitry Kazakov. Committed on 07/12/2013 at 07:23. Pushed by dkazakov into branch 'calligra/2.8'.
Fix a crash in Krita due to accessing to an unsupported action in TextTool The action "insert_table" (as well as other table-related actions) is added by the Text Tool only in case the app supports 'useAdvancedText' feature. That is why accessing the "insert_table" outside 'useAdvancedText' check will cause a crash. Please revert/change this commit if I understood something wrong :) BUG:328326 CC:[email protected] M +2 -2 plugins/textshape/TextTool.cpp http://commits.kde.org/calligra/a957d083cdc1d586ccbd2ba4a972c7eac3dd1e11 diff --git a/plugins/textshape/TextTool.cpp b/plugins/textshape/TextTool.cpp index 6674790..7925fdb 100644 --- a/plugins/textshape/TextTool.cpp +++ b/plugins/textshape/TextTool.cpp @@ -1902,8 +1902,9 @@ void TextTool::updateActions() bool useAdvancedText = !(canvas()->resourceManager()->intResource(KoCanvasResourceManager::ApplicationSpeciality) & KoCanvasResourceManager::NoAdvancedText); if (useAdvancedText) { - bool hasTable = textEditor->currentTable(); + action("insert_table")->setEnabled(notInAnnotation); + bool hasTable = textEditor->currentTable(); action("insert_tablerow_above")->setEnabled(hasTable && notInAnnotation); action("insert_tablerow_below")->setEnabled(hasTable && notInAnnotation); action("insert_tablecolumn_left")->setEnabled(hasTable && notInAnnotation); @@ -1914,7 +1915,6 @@ void TextTool::updateActions() action("split_tablecells")->setEnabled(hasTable && notInAnnotation); } action("insert_annotation")->setEnabled(notInAnnotation); - action("insert_table")->setEnabled(notInAnnotation); ///TODO if selection contains several different format emit blockChanged(textEditor->block()); _______________________________________________ calligra-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/calligra-devel
