Issue #9463: select previous tool after filter
This MR improves the workflow issue caused by #9463.
Briefly, filters are treated like tools, and can have tool buttons. If you are painting and activate a filter, you are changing tools. After using the filter, you have to select the Paintbrush Tool to continue painting. If the filter is not visible as a tool button, it will appear as if the Paintbrush has been deselected. If the canvas is clicked and you are expecting to paint, instead GIMP will throw up the filter dialog again, because that filter/tool is still active. This is not good, many times a day this happens, it's really annoying.
This MR may help. If the previous tool was not a filter tool, and a filter tool has been used, then the tool prior to the filter tool is made active after the filter completes.
For example:
if painting and then making use of the curves filter, pressing OK or Cancel on the filter dialog will return the tool to the paintbrush tool and the user continues to paint.
if painting and the curves filter tool button is pressed, and the image is clicked, pressing OK or Cancel on the filter dialog will return the tool to the paintbrush tool and the user continues to paint.
if painting and the curves filter tool button is pressed, and then the levels button is pressed, and the image is clicked, pressing OK or Cancel on the filter dialog will not change tools.
This is still quirky, that last example, to set the previous tool to a filter, but a lot less disruptive for my way of working.
It'd be nice click a toolbutton twice, to force the previously stored tool to be that tool. Unfortunately, accessing a filter via the menu is the same kind of action to GIMP as a clicking the button twice. Perhaps there's another way to apply a 'click twice to set the last tool to this tool' feature.