Brush stroke needs multiple ctrl+z to undo (possible bug)

Hello,

I’m experiencing an issue with the ctrl+z shortcut. Sometimes I need to hit the shortcut two or three times to undo a brush stroke. The problem is very inconsistent and I have no idea what causes it. First I thought the button on my tablet is just broken (it’s very old) but the problem persited when I used the keyboard instead.
I wasn’t able to reproduce the issue when using undo in the edit menu. restarting the computer didn’t fix the problem.

Does somebody else has the same issue or even a fix?

My OS is Windows 10, I’m using the Steam version of Krita.

EDIT: I found out it seems to have something to do with the overview docker. I use it on my second screen in a pretty big size. It seems when it’s refreshing the picture there is a short time window where it blocks shortcuts.

Do you use the setting option “cumulative undo” ?

(Settings → General → Miscellaneous → “Use Cumulative Undo”)

It’s currently disabled. Tomorrow I will test if this fixes the issue.

I don’t think activating it will fix anything, or worth the test. But it’s a good information that you are not using it, because it’s a feature of April 2023 affecting undo ( thread: [needs testing] Rewritten Cumulative Undo feature , if you want to know more about it). It’s also not activated by default, so, I just suspected that this one could break if activated because not actively beta-tested. But it is not that.

Another guess: in (Top menu) View → Instant Preview Mode
Checked, or not checked ? (this one can affect a lot the refresh of the canvas, and tiling).

Other lead that can affect refresh and rendering, the content of the Settings → Display,

That might be very related. The logic of Ctrl+Z shortcut is the following: if there is any action running, then cancel it. If nothing is running, then undo the last action. It seems like the overview update action runs long enough to Ctrl+Z catch it and cancel it… hence you don’t see the undo.

We need to think about how to fix that…

Hi, @Drayventhal!

Could you please test the packages from this MR (when they are ready)?

That guess that should fix your issue.

I would but I don’t know at what I’m looking here. :kiki_upside_down:

EDIT: Ok, I found the download button and unzipped the files. :kiki_sweat_smile:

It seems better in that build but not entirely fixed. Now I really have to force that behavior by waiting like a 0.75 second after the stroke and then hit undo in the perfect moment (there are probably some other operations in the background?). Most of the time it just needs like a second longer now to undo the last action but at least it happens now. In my opinion definetly an improvement and I could live with that. :+1:

EDIT 2: I still had instant preiview mode enabled from that test suggested by @Deevad. Disabling that seems to make it a bit worse again.

I tested this, but ctrl+z is still not always recognized. But it has definetly something to do with the overview docker.

Yeah, the problem is a combination of an Instant Preview mode and the Overview docker. I will think about this issue a bit more later on.

Thank you for looking into that! :kiki_smile:

Please keep me updated if you have a fix. I will tag your post as solution.