Skip to content
Commit 39331526 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

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.

2) 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.

3) 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
parent cd21bb33
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment