Created attachment 153924 [details] Visual example if the issue. SUMMARY Issue: You can "Invoke" a Tool via a shortcut (in this case the Line Tool) while the Transform Tool is still active and being used. If an operation is used in this invoked state (in this case Inverting the selection), the transform tool breaks, leading to data loss and glitches. It seems unlikely to cause this issue in the default keymap. This is especially likely to happen if a tool is invoked on modifier keys (For example using `Shift` instead of `V` to invoke the Line Tool). STEPS TO REPRODUCE 1. Set custom shortcuts a. Canvas Input Settings -> Tool Invocation -> Activate Line Tool == `Shift + LMB` b. Canvas Input Settings -> Change Primary Settings -> Normal == `Remove` c. Keyboard Shortcuts -> Krita -> General -> Invert Selection == `Shift + D` 2. Create a selection 3. Use the Transform Tool (Ctrl - T) 4. Move the selection 5. Press `Shift + D` to invert the selection 6. Use any brush on selection OBSERVED RESULT The transformed result will be erased but still be visually shown, as if the transformation was applied. The selected area will be moved back to the original position, before the transform tool was used. The selection will be successfully inverted (But at the incorrect position). Any brush stroke, no matter the selected area, will redraw the canvas, revealing the true state of the image. EXPECTED RESULT The transformation will be properly applied when using the shortcut `Shift + D`. Only then, will the selection be updated tot he correct position and properly inverted. Any brush strokes will then properly paint on the applied transformation and inverted selection (Without visual glitches). SOFTWARE/OS VERSIONS Krita Version: 5.1.1 Hidpi: true Qt Version (compiled): 5.15.5 Version (loaded): 5.15.5 OS Information Build ABI: x86_64-little_endian-lp64 Build CPU: x86_64 CPU: x86_64 Kernel Type: linux Kernel Version: 6.0.9-gentoo Pretty Productname: Gentoo Linux Product Type: gentoo Product Version: 2.9 Desktop: KDE
Could check whether this is fixed in the latest nightly unstable build? Dmitry thinks it may have been fixed already. See https://binary-factory.kde.org/job/Krita_Nightly_Appimage_Build/
Thanks for the quick reply! I tested the nightly build and the issue is indeed fixed. I noticed another issue as a result (But it's not related to this report anymore). The transform tool will immediately be executed on the inverted selection instead. This is not ideal. Also, if the shortcut to invert the selection is pressed fast enough in succession, it will sometimes not execute the transform tool. I suggest to accept the transformation if another operation (Like inverting the selection) is done, but not execute the transform tool directly after. Instead wait for a Left Mouse Click input from the user.
Please make a new report for that :-)