https://bugs.kde.org/show_bug.cgi?id=412561

Dmitry Kazakov <dimul...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/kde/ |https://invent.kde.org/kde/
                   |krita/commit/cd21bb33b70e0c |krita/commit/393315265d7647
                   |06426926c8c6c707cc540df464  |afc876a1db0e2e0776c416b240

--- Comment #19 from Dmitry Kazakov <dimul...@gmail.com> ---
Git commit 393315265d7647afc876a1db0e2e0776c416b240 by Dmitry Kazakov.
Committed on 11/11/2019 at 12:01.
Pushed by dkazakov into branch 'krita/4.2'.

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.

M  +5    -3    libs/image/commands_new/kis_saved_commands.cpp
M  +1    -1    libs/image/commands_new/kis_saved_commands.h
M  +2    -1    libs/image/kis_stroke_job.h
M  +14   -2    libs/image/kis_stroke_job_strategy.cpp
M  +4    -0    libs/image/kis_stroke_job_strategy.h
M  +5    -1    libs/image/kis_stroke_strategy_undo_command_based.cpp
M  +9    -4    libs/image/kis_stroke_strategy_undo_command_based.h
M  +31   -14  
plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp
M  +2    -0   
plugins/tools/tool_transform2/strokes/transform_stroke_strategy.h

https://invent.kde.org/kde/krita/commit/393315265d7647afc876a1db0e2e0776c416b240

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to