The drawing editor did not have any way of undoing a stroke so it was proposed to add an undo button.
Even before this change, when the whiteboard is enabled during a card review, there is an eraser menu icon which undos strokes:
Therefore the same implementation was used for the drawing editor and the same eraser icon was used for consistency. However, its possible the icon could be mistaken for an eraser drawing tool, therefore the undo icon could be a good alternative.
With eraser icon (as implemented in this PR):
Undo icon as alterntive option:
Lastly when there are no strokes to erase, the icon is disabled but remains visible.
First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible.
Description
The drawing editor did not have any way of undoing a stroke so it was proposed to add an undo button.
Even before this change, when the whiteboard is enabled during a card review, there is an eraser menu icon which undos strokes:
Therefore the same implementation was used for the drawing editor and the same eraser icon was used for consistency. However, its possible the icon could be mistaken for an eraser drawing tool, therefore the undo icon could be a good alternative.
With eraser icon (as implemented in this PR):
Undo icon as alterntive option:
Lastly when there are no strokes to erase, the icon is disabled but remains visible.
Fixes
Video Demo
undo_tool_demo.webm
Checklist