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

ctrl + z weird undo behaviour #57

Closed
Iss-in opened this issue Feb 27, 2024 · 4 comments · Fixed by #67
Closed

ctrl + z weird undo behaviour #57

Iss-in opened this issue Feb 27, 2024 · 4 comments · Fixed by #67

Comments

@Iss-in
Copy link

Iss-in commented Feb 27, 2024

So this is something i have noticed with text tool ,

if the tool is active, ie, i am typing something on the image using text tool, pressing ctrl+z while input field is active reverts any previous modification.

imo as long as input field is active, ctrl+z should do nothing or undo the last letter of text field input only .

@gabm
Copy link
Owner

gabm commented Feb 27, 2024

yep.. that makes sense.. active tool - if any - should handle undo requests

@Iss-in
Copy link
Author

Iss-in commented Feb 28, 2024

so is this intended behaviour ?
lets say i typed a text A on an image, and now in middle of typing text B on same image. while im typing text B, if i press ctrl+z , it will remove Text A , which should not happen.

what should happen -

  • text A should be unaffected
  • last done operation on text B should be undone

@gabm
Copy link
Owner

gabm commented Feb 28, 2024

no no.. it is obviously not intented.. I just stated the technical reasons for that behavior.

currently the undo action is unconditionally directed towards the "comitted drawables stack" (finished elements) and undoes the last action there. What actually should be done is: if there is an active tool (like the text tool that adds text), then that should handle the undo action. Only if there is no active tool, then it should remove the last commited drawable

@gabm
Copy link
Owner

gabm commented Mar 22, 2024

this will be fixed with #67

@gabm gabm closed this as completed in #67 Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants