SUMMARY When activating the Select Shapes Tool (DefaultTool) or the reference image tool, the actions in the context menu are always enabled at first, before the current selection has changed. STEPS TO REPRODUCE 1. Create a text shape 2. Switch back to DefaultTool 3. Right click on canvas OBSERVED RESULT Most actions are enabled when they shouldn't be, some (e.g. Group, Ungroup) should not be visible at all. EXPECTED RESULT Some actions should not be enabled when no shapes are selected. Group and ungroup actions should not be visible when only one shape is selected and that shape is not ungroupable. SOFTWARE/OS VERSIONS Windows: 10 ADDITIONAL INFORMATION For DefaultTool, the actions are disabled in DefaultTool::updateDistinctiveActions, called from DefaultTool::updateActions, which is called from DefaultTool::activate, but they are then being re-enabled in CanvasData::activateToolActions (KoToolManager.cpp:106), called from KoToolManager::Private::postSwitchTool.
Git commit c4c0d1a02fb9a2e273c9b4ee67d72821464f4861 by Dmitry Kazakov. Committed on 29/08/2023 at 11:07. Pushed by dkazakov into branch 'krita/5.2'. Fix 'enabled' state of the actions in the Default Tool The tool manager enables all the actions unconditionally, we should do that **before** actually calling the tool's activate method. M +16 -2 libs/flake/KoToolManager.cpp https://invent.kde.org/graphics/krita/-/commit/c4c0d1a02fb9a2e273c9b4ee67d72821464f4861
Git commit 087c9ef921bc70e5bee9ddc646ba4d34ad153e89 by Dmitry Kazakov. Committed on 29/08/2023 at 11:07. Pushed by dkazakov into branch 'master'. Fix 'enabled' state of the actions in the Default Tool The tool manager enables all the actions unconditionally, we should do that **before** actually calling the tool's activate method. M +16 -2 libs/flake/KoToolManager.cpp https://invent.kde.org/graphics/krita/-/commit/087c9ef921bc70e5bee9ddc646ba4d34ad153e89