diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2022-08-27 21:56:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-27 21:56:14 +0200 |
| commit | d3db8bbebddc61d07179bc1acc27853813e7a2a0 (patch) | |
| tree | 7deb731fd025f8c80dd362753a9821724aeb6e29 /editor/plugins/texture_editor_plugin.cpp | |
| parent | c7b5c908814b830ad04c4e54c1e36da3a18aa52c (diff) | |
| parent | 4b817a565cab8af648c88cfc7ab6481e86ee3625 (diff) | |
Merge pull request #62846 from AaronRecord/remove_redundant_theme_updates_in_enter_tree
Remove `NOTIFICATION_ENTER_TREE` when paired with `NOTIFICATION_THEME_CHANGED`
Diffstat (limited to 'editor/plugins/texture_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/texture_editor_plugin.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp index be382759f5..1b79527352 100644 --- a/editor/plugins/texture_editor_plugin.cpp +++ b/editor/plugins/texture_editor_plugin.cpp @@ -38,16 +38,7 @@ TextureRect *TexturePreview::get_texture_display() { void TexturePreview::_notification(int p_what) { switch (p_what) { - case NOTIFICATION_ENTER_TREE: case NOTIFICATION_THEME_CHANGED: { - if (!is_inside_tree()) { - // TODO: This is a workaround because `NOTIFICATION_THEME_CHANGED` - // is getting called for some reason when the `TexturePreview` is - // getting destroyed, which causes `get_theme_font()` to return `nullptr`. - // See https://github.com/godotengine/godot/issues/50743. - break; - } - if (metadata_label) { Ref<Font> metadata_label_font = get_theme_font(SNAME("expression"), SNAME("EditorFonts")); metadata_label->add_theme_font_override("font", metadata_label_font); |