Diffusion Krita 393315265d76

Fix layer data loss when pressing Esc multiple times, while transforming stroke

Authored by dkazakov on Wed, Nov 6, 3:17 PM.

Description

Fix layer data loss when pressing Esc multiple times, while transforming stroke

There were several problems:

  1. When the jobs from m_overriddenCommand have been executed, they shouldn't be added to the strokes's undo commands queue. After the clear-selection job, the paint device gets new transaction, therefore all the redo information is lost. And commands from the previous stroke are not valid anymore.
  1. Since the commands from m_overridenCommand do not take part in normal cancel/undo process, in case of stroke cancellation we should re-apply them manually. And therefore, we must ensure that clear selection and create-preview-device actions are executed before cancellation action is performed. Therefore the patch introduces a special isCancellable() tag of the stroke jobs.
  1. Since finishStrokeCallback() now adds more jobs to the strokes queue, we need some way to mark them non-cancellable. It is done by the same isCancellable() tag.

BUG:412561

Details

Committed
dkazakovMon, Nov 11, 12:01 PM
Parents
R37:cd21bb33b70e: Fix assert and a data-loss in Transform Tool
Branches
Unknown
Tags
Unknown