Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rotation would jump when using undo/redo and trying to modify again #1819

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

MrStevns
Copy link
Member

@MrStevns MrStevns commented Apr 11, 2024

Fixes a small bug where if you had rotated an object, then used undo/redo on it, and then rotated it again, the object would be rotated the amount of deg that was previously used when you interacted with it.

How to reproduce:

  1. Draw a stroke
  2. Select it using the Select tool
  3. Rotate it using the Move tool
  4. Move it somewhere else and rotate it 90 deg
  5. Now undo until you're back at step 3.
  6. Try to rotate the object again

Expected behavior:
The object doesn't rotate until you move the cursor around, and only as much as you rotate

Actual result:
The object rotates based on the previous value initially instead of only the current angle.

Before: After
rotation-bug rotation-bug2

@chchwy chchwy added this to the v0.6.7 milestone Apr 12, 2024
@J5lx J5lx self-assigned this Apr 13, 2024
Copy link
Member

@J5lx J5lx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice fix

@J5lx J5lx merged commit dfd68c5 into pencil2d:master Apr 13, 2024
8 checks passed
@MrStevns MrStevns deleted the bug-selection-rotation-offset branch April 14, 2024 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants