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

feat: added shortcut key for deleting guides #3184

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Afterdie
Copy link
Contributor

Pressing the esc key deletes the guide that is being hovered on. smol shortcut should come in handy

@ice0
Copy link
Collaborator

ice0 commented Aug 24, 2023

Hi, Akshat!

Can you record a short video showing the process?
I just checked and the guide is not removed after pressing Esc key.
If I press Esc multiple times, Synfig crashes.

P.S.
Ok, got it. The guide is removed, but the window is not redrawn (unless you move the mouse).

@Afterdie
Copy link
Contributor Author

@ice0 added a redraw event should be working as expected now 👍

@ice0
Copy link
Collaborator

ice0 commented Aug 26, 2023

@ice0 added a redraw event should be working as expected now 👍

Now it's better, but it still crashes if I press Esc second time.

synfig-studio/src/gui/workarea.cpp Outdated Show resolved Hide resolved
@ice0
Copy link
Collaborator

ice0 commented Aug 27, 2023

Looks much better, but I noticed two more issues.

  1. The guide is not deleted if the user pressed the Esc key immediately after the guide was created.
  2. Maybe update the current guide after deleting the current one?
    In the example below, after removing the horizontal guide, the vertical guide is not selected until the user moves the mouse.
guide_issues.mp4

@Afterdie
Copy link
Contributor Author

Afterdie commented Sep 8, 2023

Looks much better, but I noticed two more issues.

  1. The guide is not deleted if the user pressed the Esc key immediately after the guide was created.
  2. Maybe update the current guide after deleting the current one?
    In the example below, after removing the horizontal guide, the vertical guide is not selected until the user moves the mouse.

guide_issues.mp4

fixed both the issues. Im not sure if it the queue_draw() is in the right place tho 🤔

synfig-studio/src/gui/workarea.cpp Show resolved Hide resolved
synfig-studio/src/gui/workarea.cpp Outdated Show resolved Hide resolved
synfig-studio/src/gui/workarea.cpp Outdated Show resolved Hide resolved
synfig-studio/src/gui/workarea.cpp Show resolved Hide resolved
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 this pull request may close these issues.

None yet

3 participants