Adjust the Edit Path tool switching on completion, allowing for code cleanup
The main improvement in this patch series is a more consistent behavior when confirming the action in the Edit Path tool, which is detailed in the commit messages.
This simple change allows for a thorough code cleanup, removing all the parameter passing done by the "temporary activation" infrastructure. This activation mode used to be common, but over time fell into disuse except for a few leftovers.
For background, I've researched this code as I'd like to facilitate the switching to different tools on completion in general, and I found an opportunity to simplify the code that is already there before adding new logic for other tools. Tool switching on completion is a user experience papercut that I think may affect the new "Paste in Active Layer" action, as well as the "Activate transform tool after pasting" option.
Test Plan
- Create a vector layer with a shape.
- Activate the Select Shapes tool and select the shape.
- (a) Press ENTER or (b) Activate the Edit Path tool.
With or without the patch, the steps above should have the same effect in case (a) and case (b).
- Edit the shape, then press ENTER.
With the patch, the Select Shapes tool should be activated regardless. Without it, ENTER has no effect in case (b). The Text Tool always switches back to the Select Shapes tool regardless of how it was activated.
Unit Tests
When running unit tests, I got QFATAL : TestDocument::testSetColorProfile() Received signal 11
, but it does not seem to be related to this patch.
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
I tested the relevant unit tests and can confirm they are not broken. (See above) -
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.