https://bugs.kde.org/show_bug.cgi?id=420338
--- Comment #5 from wolthera <griffinval...@gmail.com> --- copy-pasting the gist of an irc discussion on a technical solution here: three ways to solve that: very hackish, a bit hackish and normal one first one is just to skip adding selection in KisResourcesSnapshot if it is empty. But GUI will be still inconsistent and tools that don't use resources snapshot will still be locked second one: add a custom code to KisSelectionDecoration::selectionChanged() that checks if the selection is empty and adds **a separate undo history step** that deselects the selection, when it is empty, that would break a few coding standards, but would somehow work and the last one: extract the code from KisSelectionToolHelper::selectPixelSelection() that deselects the selection into something reusable and add that to all the selection modification actions the list of actions is not very long, btw - so, I would like to do the last one, but how should I do that with selection-filters? Because the initial report was about the invert filter. And I think it might be quite possible to do with the other selection filters given a little creativity. KisSelectionToolHelper::selectPixelSelection, KisSelectionToolHelper::addSelectionShapes, KisFilterSelectionOperation::runFilter there is a base class, KisFilterSelectionOperation is the base class for all of them. Just add a CompositeCommand to it, like it happens in KisSelectionToolHelper::selectPixelSelection so, ideally, it would be nice to extend the deselection code from KisSelectionToolHelper::selectPixelSelection() to work with local selections as well ah, it is much easier, sorry. You should just use KisDeselectActiveSelectionCommand instead of KisDeselectGlobalSelectionCommand. and this command will choose the proper algorithm automagically -------- (needless to say, we're going with the latter) -- You are receiving this mail because: You are watching all bug changes.