Created attachment 189593 [details] Adding text to paint layer vs vector layer. SUMMARY Minor inconsistency: when adding text to a vector layer, the text object will automatically get "activated" and the text highlighted. When adding text on a non-vector layer, a new vector layer is added and the text object added but not "activated". STEPS TO REPRODUCE 1. Create new document (with a paint/background layer) 2. Select the Text Tool and click to create new text object, automatically generating a vector layer with placeholder text. 3. Click and drag once more to create a new text object. A new text object is created as expected, this time automatically highlighting the text and enabling editing. I've attached a video demonstrating the bug.
Bug is reproducible in 5.3 Beta 3 on Windows 10.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2713
Git commit ce382c8dc11e5336b95fcad441865254b8d1cc30 by Dmitry Kazakov. Committed on 09/04/2026 at 09:57. Pushed by dkazakov into branch 'master'. Fix the crash when trying to add a shape to a vector layer Changing function signature from `KoShapeContainer *` to `KoShapeContainer **` is really dangerous. Some places called this function with a null pointer, so the compiler couldn't catch this change. This patch reverts a portion of the previous commit, restoring the old API with `KoShapeContainer *`, but just creating a parent for the newly text shape manually with a `createParentForShapes()` call. That ensures that we know the new parent long before the controller's `addShape()` method is called. M +9 -9 libs/flake/KoShapeController.cpp M +2 -2 libs/flake/KoShapeController.h M +1 -4 libs/flake/tests/TestShapePainting.cpp M +1 -1 libs/flake/tools/KoPathTool.cpp M +1 -1 plugins/tools/defaulttool/defaulttool/DefaultTool.cpp M +14 -5 plugins/tools/svgtexttool/SvgCreateTextStrategy.cpp M +1 -1 plugins/tools/tool_knife/CutThroughShapeStrategy.cpp M +1 -1 plugins/tools/tool_knife/RemoveGutterStrategy.cpp https://invent.kde.org/graphics/krita/-/commit/ce382c8dc11e5336b95fcad441865254b8d1cc30
Git commit a03e5d0367200e12243f37fce70eb14a37e932f5 by Dmitry Kazakov, on behalf of Luna Lovecraft. Committed on 09/04/2026 at 09:02. Pushed by dkazakov into branch 'master'. Fix text not getting selected when created on a normal layer M +9 -9 libs/flake/KoShapeController.cpp M +2 -2 libs/flake/KoShapeController.h M +4 -1 libs/flake/tests/TestShapePainting.cpp M +1 -1 libs/flake/tools/KoPathTool.cpp M +1 -1 plugins/tools/defaulttool/defaulttool/DefaultTool.cpp M +7 -2 plugins/tools/svgtexttool/SvgCreateTextStrategy.cpp M +2 -1 plugins/tools/svgtexttool/SvgTextTool.cpp M +1 -1 plugins/tools/tool_knife/CutThroughShapeStrategy.cpp M +1 -1 plugins/tools/tool_knife/RemoveGutterStrategy.cpp https://invent.kde.org/graphics/krita/-/commit/a03e5d0367200e12243f37fce70eb14a37e932f5
Git commit f729bb6cebcd38684ff28d02b37f52680d56fe80 by Dmitry Kazakov. Committed on 09/04/2026 at 10:05. Pushed by dkazakov into branch 'master'. Remove commented out code It seems like the idea was to deselect a text shape on pressing "Enter" key, though it is currently impossible, because Enter key is now processed by the text edit mode itself. With this line present, activation of a layer (with a node-changed singal) deselects all shapes, which is not very useful for the user. M +0 -3 plugins/tools/svgtexttool/SvgTextTool.cpp https://invent.kde.org/graphics/krita/-/commit/f729bb6cebcd38684ff28d02b37f52680d56fe80
Git commit 805c7c4686a107cd0c479fa33c47241bb98f6434 by Dmitry Kazakov, on behalf of Luna Lovecraft. Committed on 09/04/2026 at 10:08. Pushed by dkazakov into branch 'krita/6.0'. Fix text not getting selected when created on a normal layer M +9 -9 libs/flake/KoShapeController.cpp M +2 -2 libs/flake/KoShapeController.h M +4 -1 libs/flake/tests/TestShapePainting.cpp M +1 -1 libs/flake/tools/KoPathTool.cpp M +1 -1 plugins/tools/defaulttool/defaulttool/DefaultTool.cpp M +7 -2 plugins/tools/svgtexttool/SvgCreateTextStrategy.cpp M +2 -1 plugins/tools/svgtexttool/SvgTextTool.cpp M +1 -1 plugins/tools/tool_knife/CutThroughShapeStrategy.cpp M +1 -1 plugins/tools/tool_knife/RemoveGutterStrategy.cpp https://invent.kde.org/graphics/krita/-/commit/805c7c4686a107cd0c479fa33c47241bb98f6434
Git commit f45b43133df6962d9a884a8e54ddef6f162588db by Dmitry Kazakov. Committed on 09/04/2026 at 10:08. Pushed by dkazakov into branch 'krita/6.0'. Remove commented out code It seems like the idea was to deselect a text shape on pressing "Enter" key, though it is currently impossible, because Enter key is now processed by the text edit mode itself. With this line present, activation of a layer (with a node-changed singal) deselects all shapes, which is not very useful for the user. M +0 -3 plugins/tools/svgtexttool/SvgTextTool.cpp https://invent.kde.org/graphics/krita/-/commit/f45b43133df6962d9a884a8e54ddef6f162588db
Git commit 2d975fd8be2ff613b1066a205aa90aa5867f2fd6 by Dmitry Kazakov. Committed on 09/04/2026 at 10:08. Pushed by dkazakov into branch 'krita/6.0'. Fix the crash when trying to add a shape to a vector layer Changing function signature from `KoShapeContainer *` to `KoShapeContainer **` is really dangerous. Some places called this function with a null pointer, so the compiler couldn't catch this change. This patch reverts a portion of the previous commit, restoring the old API with `KoShapeContainer *`, but just creating a parent for the newly text shape manually with a `createParentForShapes()` call. That ensures that we know the new parent long before the controller's `addShape()` method is called. M +9 -9 libs/flake/KoShapeController.cpp M +2 -2 libs/flake/KoShapeController.h M +1 -4 libs/flake/tests/TestShapePainting.cpp M +1 -1 libs/flake/tools/KoPathTool.cpp M +1 -1 plugins/tools/defaulttool/defaulttool/DefaultTool.cpp M +14 -5 plugins/tools/svgtexttool/SvgCreateTextStrategy.cpp M +1 -1 plugins/tools/tool_knife/CutThroughShapeStrategy.cpp M +1 -1 plugins/tools/tool_knife/RemoveGutterStrategy.cpp https://invent.kde.org/graphics/krita/-/commit/2d975fd8be2ff613b1066a205aa90aa5867f2fd6