Tool switching code cleanup
This is ground work for introducing more flexible tool switching later, such as selecting the most relevant next tool when ENTER is pressed, or the most recently used paint tool when a new brush is selected.
In the process, I removed almost 200 lines of redundant code and old documentation.
I also made the code easier to follow: the private switchTool
function had an overload that had different side-effects depending on the type of the argument, while now there is only one function. This allows to simplify the logic of some code, even though there is an additional look-up by string in one code path only.
Test Plan
No functional changes are intended in this branch, but !693 (merged) is worth testing again.
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. (If not possible, don't hesitate to ask for help!) -
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.