Undo during Lod0 stroke recalculation
Closed, ResolvedPublic

dkazakov created this task.May 20 2016, 9:23 AM
Restricted Application added a subscriber: woltherav. · View Herald TranscriptMay 20 2016, 9:23 AM

Hi, All!

I have just fixed quite an old bug that prevented quite a lot of people from using Instant Preview. Previously, when you pressed Ctrl+Z in Instant Preview mode, Krita would wait until all the background strokes are finished, which could take quite a lot of time, and only after that would allow you to do undo. Now this bug is gone!

From now on, you can make undo operations right during Instant preview mode and you will see the result instantly!

The only trouble is that this patch touches the heart of Krita, and therefore a bit dangerous. So I would like to ask you to test it before I can merge it into master :)

The code can be fetched from a separate branch:

git checkout kazakov/undo-with-instant-preview-T2544

What needs to be tested:

  1. Create a big canvas (5000+) and activate a huge brush :)
  2. Do a lot of strokes and mix them with Ctrl+Z. The result should be at least expected.
  3. Test the same "action + Ctrl-Z" with the following features (they also use Instant Preview):
  4. transform image (scale/rotate)
  5. move layers with move tool
  6. move selection with move tool
  7. apply heavy filter using the "Filters" menu

If you like the feature and confirm it is safe, we can even try to include it into Krita 3.1! :)

Deevad added a subscriber: Deevad.Oct 21 2016, 12:17 PM

I tested large brushes + undo + instant preview on a 8000x8000px: impressive work.

The only issue I found is with 'redo' : for example, If I take a big brush, and write 1 , 2 , 3 , 4 , 5 , then immediately undo 5 times, I can remove all the letters. But if I redo five time I can only redo 1 , 2 , 3 , 4 without 5. This happens always with the last stroke of painting in a instant-preview undo stack ; possible to undo it, but never to redo it.

Other problem saw (but probably unrelated) Ctrl+T transform mode interactive deform while pressing Ctrl ( to put in pseudo 3D transform ) is broken. The Transform widget reset to no transform after each drag.

In T2544#60981, @Deevad wrote:

The only issue I found is with 'redo' : for example, If I take a big brush, and write 1 , 2 , 3 , 4 , 5 , then immediately undo 5 times, I can remove all the letters. But if I redo five time I can only redo 1 , 2 , 3 , 4 without 5. This happens always with the last stroke of painting in a instant-preview undo stack ; possible to undo it, but never to redo it.

Yes, if you undo the stroke before it's full-sized version is rendered, you cannot redo it. And I doubt it can be fixed in any sane way. Until we rendered the full version of the stroke we have no undo information for it. So when you press Ctrl+Z before the stroke is ended, it is just cancelled.

Other problem saw (but probably unrelated) Ctrl+T transform mode interactive deform while pressing Ctrl ( to put in pseudo 3D transform ) is broken. The Transform widget reset to no transform after each drag.

Yes, I think it is unrelated. Please report it separately :)

dkazakov moved this task from Backlog to Make Noise! on the Krita: Releases board.
rempt closed this task as Resolved.Jan 2 2018, 1:04 PM