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

The theme editor is opened only once #97278

Closed
JekSun97 opened this issue Sep 21, 2024 · 17 comments · Fixed by #97543
Closed

The theme editor is opened only once #97278

JekSun97 opened this issue Sep 21, 2024 · 17 comments · Fixed by #97543

Comments

@JekSun97
Copy link
Contributor

JekSun97 commented Sep 21, 2024

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.
scr

However, we can open the theme editor if we select the theme in the file manager

Steps to reproduce

  1. Create a new theme for any Control node
  2. Select this theme in the inspector to open the theme editor
  3. Close the theme editor
  4. Repeat step 2 and the theme editor will not open

Minimal reproduction project (MRP)

N/A

@JekSun97

This comment was marked as off-topic.

@AThousandShips

This comment was marked as resolved.

@JekSun97

This comment was marked as off-topic.

@AThousandShips

This comment was marked as resolved.

@AThousandShips
Copy link
Member

AThousandShips commented Sep 22, 2024

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):

@shahriarlabib000
Copy link
Contributor

shahriarlabib000 commented Sep 22, 2024

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

  • 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:

Screenrecorder-2024-09-22-23-48-25-701.mp4

But idk if this is the right way to do it or if this is intended behavior or not so sorry for that

Edit:

  1. Here is the original commit
  2. Latest commit

@AThousandShips
Copy link
Member

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

@shahriarlabib000
Copy link
Contributor

I can confirm this much that this is Reproducible in 4.2.2.stable

@shahriarlabib000
Copy link
Contributor

How can I create an invalid theme kinda curious what will happen

@AThousandShips
Copy link
Member

You don't, edit can be called with nullptr, it's done to clear things

@JekSun97
Copy link
Contributor Author

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

@JekSun97
Copy link
Contributor Author

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

0924.mp4

@shahriarlabib000
Copy link
Contributor

shahriarlabib000 commented Sep 25, 2024

I think the close button was added in 4.2
Added in #81523 I think

@shahriarlabib000
Copy link
Contributor

@AThousandShips is this any good

@AThousandShips
Copy link
Member

This is not my area so I can't comment on this

@AThousandShips
Copy link
Member

@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
Copy link
Contributor Author

@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

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

Successfully merging a pull request may close this issue.

4 participants