The theme editor is opened only once
Tested versions
4.3 stable, 4.4 dev2
System information
Godot v4.4.dev2 - Windows 10.0.19045 - OpenGL 3 (Compatibility) - Radeon RX 560 Series (Advanced Micro Devices, Inc.; 31.0.14001.45012) - Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz (4 Threads)
Issue description
When we create a new theme for any Control node, clicking on the resource opens the theme editor, then if we close this editor, the theme editor can no longer be opened by clicking on the resource in the inspector.
However, we can open the theme editor if we select the theme in the file manager
Steps to reproduce
- Create a new theme for any Control node
- Select this theme in the inspector to open the theme editor
- Close the theme editor
- Repeat step 2 and the theme editor will not open
Minimal reproduction project (MRP)
N/A
@AThousandShips Isn't this a mistake?
I have no clue? I haven't tagged this as anything nor have I done any triage on this
Could you please mark this as a bug? Usually the issues that are marked as a bug are the ones that are prioritized for fixing
Calm down and be patient, I'm not working right now (I would need to actually test this to assign a label), it's the weekend, and I'm not the only one who does bug triage
Also please don't tag random maintainers, I have no connection to this bug report
Can confirm this behavior, however it is the same with other editors in the bar, so unsure if this is intentional or a bug, will see what the relevant teams think. It'd be relevant to know if this has always been the case, and if not when it changed, and why, if it was accidental or intentional, etc.
See also (for the converse problem and frustration):
- https://github.com/godotengine/godot/issues/92889
I don't think it's intentional cause if you clear theme and add a new one the preview still doesn't open. Here is a branch that sort of fixes it but not really https://github.com/shahriarlabib000/godot/tree/theme
- [x] Still have to figure out a way to detect when the preview is closed.
- [ ] have to do something about the inspector theme expand/contract thing. Otherwise you have to press the theme twice.
Here is a video:
https://github.com/user-attachments/assets/82847276-fb3f-4084-93fa-9b8c345608b0
But idk if this is the right way to do it or if this is intended behavior or not so sorry for that
Edit:
It'd be good to identify when this was changed if it was different in the past
But that solution doesn't look right it shows it regardless of the theme is valid, and edit can be called in some cases
I can confirm this much that this is Reproducible in 4.2.2.stable
How can I create an invalid theme kinda curious what will happen
You don't, edit can be called with nullptr, it's done to clear things
It'd be good to identify when this was changed if it was different in the past
I can't check it yet, but I definitely remember that this behavior didn't happen in 3.x, since I often switched between nodes and called the theme editor in this way
As it turned out, this is indeed the case, in 3.x there is no such problem, most likely this is an old error that arose in 4.0, I doubt that this behavior is intended on purpose, because if we do not save this topic to disk, we will not be able to open it until we reload the project
https://github.com/user-attachments/assets/e9e509b4-3e05-4cb9-b634-785b0d4e445c
I think the close button was added in 4.2 Added in #81523 I think
@AThousandShips is this any good
This is not my area so I can't comment on this
@JekSun97 To clarify, as we've discussed different things in this thread, and there's no clear instructions, do you mean the "Close" button in the theme editor, or closing the theme editor from the bottom bar?
@JekSun97 To clarify, as we've discussed different things in this thread, and there's no clear instructions, do you mean the "Close" button in the theme editor, or closing the theme editor from the bottom bar?
Sorry, I really didn't make this clear, we need to use the Close button specifically to reproduce this, I'll duplicate my comment from the PR:
The problem is that if we close the theme editor (using the close button), then when we click on the theme in the inspector, the theme editor will not open again, for this we need to select any other node, and then Control with the theme again, then the theme editor will open again, you must agree, quite strange behavior