-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Updates filesystem dock when theme is changed #23215
Conversation
editor/filesystem_dock.cpp
Outdated
display_mode = new_display_mode; | ||
old_display_mode_setting = display_mode_setting; | ||
if (p_force || new_display_mode != display_mode || old_display_mode_setting != display_mode_setting) { | ||
if (!p_force) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This if(...) is not really needed. If a change happens in the properties but p_force is true, the properties wont be changed until another useless update.
Isn't there a way to check whether or not the theme has changed instead of triggering the update every time a settings changed ? |
d555345
to
3af11ff
Compare
Oh, ok @groud I changed it, now it looks better ? |
Looks good to me. |
Thanks! |
I'm getting a segfault when closing the editor, I suspect this PR:
I'll build with a local revert to confirm this guess. |
BTW that's the longest backtrace I've seen so far in Godot, looks like there's a huge mess going on when |
Confirmed that reverting this PR fixes the segfault. |
Sorry, about it |
I think _update_display_mode(true); should not be called in NOTIFICATION_THEME_CHANGED... |
No problem, it was not obvious from the code change that it could cause a crash. It looks like |
When theme changed filesystem dock does not properly updated, after this PR it will..
Before:
After: