Loregret / script-panel-plus

Script Panel Plus is a replacement for a built-in Godot's scripting panel. It has more features and is highly customizable.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Script List not consistent

Drathal opened this issue · comments

Version: 1.6.5
Godot: 4.1.1
OS: Windows 11

When I have several Scripts opened. I can close one by right clicking. This script is then removed from the script list. and in the editor.

behaviour now

When I use the menu bar to close all Scripts File -> Close All.

  • The Editor closes all opened scripts.
  • But the script list is not updated. All scripts are still shown.

When I now change tabs from scripts to another tab (docs) and back

  • the script list is empty.

Then opening another script

  • will show all scripts (even closed ones) in the script list.

expected behaviour

When I use the menu bar to close all Scripts File -> Close All.

  • The Editor closes all opened scripts.
  • The script list is updated. Script List is empty

When I now change tabs from scripts to another tab (docs) and back

  • the script list is empty.

Then opening another script

  • will show only the opened script in the script list.

Exception for this rule:

The favourites tab shows all my favourites of course

Godot_v4 2-dev4_win64_Q2k11IcStP

motivation

Sometimes I have just to many scripts open. Then I just close all scripts to have a clean script list.

@Drathal Hello there.

I have read your proposal, but I couldn't resolve it in a way you wanted. Try out the New Release.

I've tried many hours to connect my own functions to the Godot's own MenuBar, but without a result.

So, buttons in the top menu bar won't work with a plugin's list. So, I just added new buttons to scripts' popup menus. Hopefully, it will be enough for you.

Screenshot_20230917_161241

@Loregret Thanks for the new version.

The new version really feels good.

Maybe I have a false intension when i use the favourites. At the moment they are something like session favourites. But then close all scripts should not close favourites. Or it can close them but not remove them from the favourites list. That feels somewhat strange and i personally have no use for favourites as they function now. Because when im unaware, i could accidentally close them all. Also i will lose them when ending a session.

I would now just hide the favourites Tab for me. But then i would like if the add to favourites menu entry would also be hidden.

Maybe the favourites could be just a list of favourite files that i could use to open a script, or jump to it. Then this list have to persist as a file.

I am new to Godot especially to writing editor plugins. Maybe i could also toy with it and make a PR for the favourites functionality.

I hope that helps.

@Drathal Check this out.

I added an option in Plugin Settings to avoid Favorites from being closed by "Close All", "Close Docs" and "Close Other". It's off by default, because I prefer current behavior more.

Is it acceptable for you?

Also, I use "Add to Favourites" entry without Favourites Tab visible, just to highlight scripts with a ⭐ icon.

I think giving each popup entry a hiding option is an overkill for now. Maybe I will change my mind in the future, but now I'm against it.

That solution sounds and feels good for me. Thanks for your effort into it.