Skip to content

Draw: Undo restores the canvas after Clear but leaves the undo/redo controls in the wrong state #237

Description

@fubai578

Checklist

  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected app version

1.4.0 (version code 7)

Affected Android/Custom ROM version

Android 14 (API 34)

Affected device model

Android emulator, Pixel 6 profile (1080 x 2400)

How did you install the app?

None

Steps to reproduce the bug

  1. Install the app fresh, start it and open an empty canvas.
  2. Draw a diagonal stroke and confirm that the undo button appears.
  3. Run the control path first: tap the ordinary undo button and confirm that the undo button disappears and a redo button appears.
  4. Start the failing path: draw a stroke, then tap the app's own Clear.
  5. Tap Yes in the "Are you sure you want to clear the canvas?" dialog.
  6. Tap the app's own undo button.

Expected behavior

After confirming Clear and pressing Undo, the canvas should be restored and the history controls should match the normal undo behaviour: the button at that position should become Redo (a left-pointing arrow) and Undo should no longer be available. If Clear is deliberately excluded from the same history stack, the app should disable the Undo button for it instead of restoring the content while leaving the controls inconsistent.

Actual behavior

With a diagonal stroke on the canvas, pressing Clear and confirming with "Yes" empties the canvas but leaves the undo button visible. Pressing that button restores the stroke, yet the controls stay in the same state as before - the undo button is still shown and a redo button never appears. On the same app version the ordinary undo path behaves differently: after a normal undo the canvas is cleared and the button changes into a redo (left-pointing) arrow.

Screenshots/Screen recordings

ignoreImageMinify ignoreImageMinify ignoreImageMinify ignoreImageMinify ignoreImageMinify

Additional information

Package: org.fossify.paint
Version: 1.4.0.

It happens every time. The drawing does come back after undo, but the undo arrow is still shown even though there is nothing left to undo, and the redo arrow never appears.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not workingneeds triageIssue is not yet ready for PR authors to take up

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions