MicroPad / MicroPad-Core

µPad (MicroPad) is an open digital note taking app
https://getmicropad.com
Mozilla Public License 2.0
234 stars 22 forks source link

Drawing lost on mode change/state change #386

Closed Jonas-July closed 2 years ago

Jonas-July commented 2 years ago

Describe the bug When changing the state of a drawing, the image is reset

To Reproduce

  1. Insert a drawing
  2. Select "Rainbow"
  3. Draw something
  4. Select "Line". This also works with "Eraser"
  5. The drawn image will disappear The same happens when changing the line colour, but simply setting the mode to "Line" (if that was the previous value) doesn't reset the image.

Expected behaviour The image should not disappear

Desktop (please complete the following information):

Additional context The new state management seems to trigger an update to the drawing element. So when changing the drawMode, the image is reset and the drawings lost. This only happens since the last commit 6177161f5bcdb172fe56cc6cad7585cf64083c05