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

Animation SpriteFrames: do not lose focus when deleting frame #9387

Open
hsandt opened this issue Mar 26, 2024 · 0 comments
Open

Animation SpriteFrames: do not lose focus when deleting frame #9387

hsandt opened this issue Mar 26, 2024 · 0 comments

Comments

@hsandt
Copy link

hsandt commented Mar 26, 2024

Describe the project you are working on

A platformer with character animations

Describe the problem or limitation you are having in your project

It takes quite some time to delete sprite frames frame by frame as I must click, Delete, re-click on the sprite frames central area to regain focus, Delete, etc.

If I don't re-click on the sprite frames central area, on second Delete, Godot thinks I want to delete the currently selected Scene Tree Node (this is a common issue in Godot, where context detection is not great and Delete will often try to delete scene tree nodes even after working with other panels).

Godot 4 2 1 - Chain delete sprite frames

So I often end up just using the equivalent Bin (Delete Frame) instead since I have to use the mouse anyway, and I can chain clicks so it spares all the Delete key presses...

In addition, batch selection is not available in 4.2 so I cannot select all frames and delete them at once. However, it will be in 4.3 thanks to godotengine/godot#85494, which will make this proposal less important, nevertheless convenient for people who prefer chain-Delete to think in advance and select all the frames they need to delete first.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

After deleting a sprite frame's frame with the Delete button, keep focus on the sprite frames panel to allow a second deletion.

Whether or not to keep focus after clicking the Bin (Delete Frame) button is another question, since the button is always contextual and allows chain-delete anyway. I suppose it would make sense to keep focus after clicking on the Bin button though, and in fact all the tool buttons, for consistency and to allow chaining with key-based actions (and if you think about it, this is how other panels like the Scene editor work, and generally speaking this is how panels in applications work).

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

  • when SpriteFrames panel centra area is focused, after pressing Delete to delete a sprite frame, keep focus on the pane central area
  • after clicking on a SpriteFrames tool button such as Delete or Insert Empty, focus the central area (including if it was not focused before)

If this enhancement will not be used often, can it be worked around with a few lines of script?

No, it's native panel behavior

Is there a reason why this should be core and not an add-on in the asset library?

Native panel behavior

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

No branches or pull requests

2 participants