godot/editor/plugins
Rémi Verschelde fd6453c45e Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
This reverts commit 4b817a565c.

Fixes #64988.
Fixes #64997.

This caused several regressions (#64988, #64997,
https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605)
which point at a flaw in the current logic:

- `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with
  `NOTIFCATION_THEME_CHANGED` as introduced in #62845.
- Some classes use their `THEME_CHANGED` to cache theme items in
  member variables (e.g. `style_normal`, etc.), and use those member
  variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE`
  notification is now deferred, they end up accessing invalid state and this
  can lead to not applying theme properly (e.g. for EditorHelp) or crashing
  (e.g. for EditorLog or CodeEdit).

So we need to go back to the drawing board and see if `THEME_CHANGED` can be
called earlier so that the previous logic still works?

Or can we refactor all engine code to make sure that:
- `ENTER_TREE` and similar do not depend on theme properties cached in member
  variables.
- Or `THEME_CHANGE` does trigger a general UI update to make sure that any
  bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE`
  does arrive for the first time. But that means having a temporary invalid
  (and possibly still crashing) state, and doing some computations twice
  which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-29 11:11:29 +02:00
..
tiles Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
abstract_polygon_2d_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
abstract_polygon_2d_editor.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
animation_blend_space_1d_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
animation_blend_space_1d_editor.h Add read-only mode to AnimationTreeEditor plugins 2022-08-25 16:29:36 +01:00
animation_blend_space_2d_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
animation_blend_space_2d_editor.h Add read-only mode to AnimationTreeEditor plugins 2022-08-25 16:29:36 +01:00
animation_blend_tree_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
animation_blend_tree_editor_plugin.h Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
animation_library_editor.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
animation_library_editor.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
animation_player_editor_plugin.cpp Merge pull request #64386 from timothyqiu/anim-disable 2022-08-29 07:50:00 +02:00
animation_player_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
animation_state_machine_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
animation_state_machine_editor.h Add read-only mode to AnimationTreeEditor plugins 2022-08-25 16:29:36 +01:00
animation_tree_editor_plugin.cpp Remove Signal connect binds 2022-07-29 16:26:13 +02:00
animation_tree_editor_plugin.h Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
asset_library_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
asset_library_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
audio_stream_randomizer_editor_plugin.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
audio_stream_randomizer_editor_plugin.h
bit_map_editor_plugin.cpp Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
bit_map_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
bone_map_editor_plugin.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
bone_map_editor_plugin.h Add simple auto mapping to BoneMapper 2022-08-23 16:43:33 +09:00
camera_3d_editor_plugin.cpp
camera_3d_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
canvas_item_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
canvas_item_editor_plugin.h Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
cast_2d_editor_plugin.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
cast_2d_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
collision_polygon_2d_editor_plugin.cpp Style: Apply clang-tidy to current code, add readability-redundant-member-init 2022-04-04 21:49:51 +02:00
collision_polygon_2d_editor_plugin.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
collision_shape_2d_editor_plugin.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
collision_shape_2d_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
control_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
control_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
cpu_particles_2d_editor_plugin.cpp Rename ParticlesMaterial to ParticleProcessMaterial 2022-08-26 02:53:08 +02:00
cpu_particles_2d_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
cpu_particles_3d_editor_plugin.cpp
cpu_particles_3d_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
curve_editor_plugin.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
curve_editor_plugin.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
debugger_editor_plugin.cpp Implement MenuBar control to wrap PopupMenus or native menu, use native menu for editor. 2022-08-18 22:25:44 +03:00
debugger_editor_plugin.h Implement MenuBar control to wrap PopupMenus or native menu, use native menu for editor. 2022-08-18 22:25:44 +03:00
editor_debugger_plugin.cpp
editor_debugger_plugin.h
editor_preview_plugins.cpp Remove Signal connect binds 2022-07-29 16:26:13 +02:00
editor_preview_plugins.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
editor_resource_conversion_plugin.cpp Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
editor_resource_conversion_plugin.h Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
font_config_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
font_config_plugin.h Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
gdextension_export_plugin.h Split up editor export code into multiple files 2022-07-26 08:28:19 -05:00
gpu_particles_2d_editor_plugin.cpp Rename ParticlesMaterial to ParticleProcessMaterial 2022-08-26 02:53:08 +02:00
gpu_particles_2d_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
gpu_particles_3d_editor_plugin.cpp Rename ParticlesMaterial to ParticleProcessMaterial 2022-08-26 02:53:08 +02:00
gpu_particles_3d_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
gpu_particles_collision_sdf_editor_plugin.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
gpu_particles_collision_sdf_editor_plugin.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
gradient_editor_plugin.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
gradient_editor_plugin.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
gradient_texture_2d_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
gradient_texture_2d_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
input_event_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
input_event_editor_plugin.h Redesign InputEvent editor plugin 2022-04-12 08:30:24 -05:00
light_occluder_2d_editor_plugin.cpp Remove RES and REF typedefs in favor of spelled out Ref<> 2022-05-03 01:43:50 +02:00
light_occluder_2d_editor_plugin.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
lightmap_gi_editor_plugin.cpp Seperate filter and description in FileDialog.add_filter() 2022-07-09 10:51:45 -05:00
lightmap_gi_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
line_2d_editor_plugin.cpp Style: Apply clang-tidy to current code, add readability-redundant-member-init 2022-04-04 21:49:51 +02:00
line_2d_editor_plugin.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
material_editor_plugin.cpp Merge pull request #64367 from Mickeon/rename-var-to-str 2022-08-26 23:04:06 +02:00
material_editor_plugin.h Rename ParticlesMaterial to ParticleProcessMaterial 2022-08-26 02:53:08 +02:00
mesh_editor_plugin.cpp Rename str2var to str_to_var and similar 2022-08-26 14:58:22 +02:00
mesh_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
mesh_instance_3d_editor_plugin.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
mesh_instance_3d_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
mesh_library_editor_plugin.cpp Remove Signal connect binds 2022-07-29 16:26:13 +02:00
mesh_library_editor_plugin.h Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init 2022-05-02 16:28:25 +02:00
multimesh_editor_plugin.cpp Remove Signal connect binds 2022-07-29 16:26:13 +02:00
multimesh_editor_plugin.h Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init 2022-05-02 16:28:25 +02:00
navigation_polygon_editor_plugin.cpp Remove RES and REF typedefs in favor of spelled out Ref<> 2022-05-03 01:43:50 +02:00
navigation_polygon_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
node_3d_editor_gizmos.cpp Merge pull request #64367 from Mickeon/rename-var-to-str 2022-08-26 23:04:06 +02:00
node_3d_editor_gizmos.h Restore RigidBody2/3D, SoftBody names in physics 2022-08-26 12:26:25 +02:00
node_3d_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
node_3d_editor_plugin.h Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
occluder_instance_3d_editor_plugin.cpp Seperate filter and description in FileDialog.add_filter() 2022-07-09 10:51:45 -05:00
occluder_instance_3d_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
packed_scene_translation_parser_plugin.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
packed_scene_translation_parser_plugin.h Add a new HashSet template 2022-05-20 22:40:38 +02:00
path_2d_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
path_2d_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
path_3d_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
path_3d_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
physical_bone_3d_editor_plugin.cpp Style: Apply clang-tidy to current code, add readability-redundant-member-init 2022-04-04 21:49:51 +02:00
physical_bone_3d_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
polygon_2d_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
polygon_2d_editor_plugin.h Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init 2022-05-02 16:28:25 +02:00
polygon_3d_editor_plugin.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
polygon_3d_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
resource_preloader_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
resource_preloader_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
root_motion_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
root_motion_editor_plugin.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
script_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
script_editor_plugin.h Replace Array return types with TypedArray 2 2022-08-23 23:21:32 +02:00
script_text_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
script_text_editor.h Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
SCsub
shader_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
shader_editor_plugin.h Add drag and drop support to shader list 2022-08-26 03:19:01 +02:00
shader_file_editor_plugin.cpp Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
shader_file_editor_plugin.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
skeleton_2d_editor_plugin.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
skeleton_2d_editor_plugin.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
skeleton_3d_editor_plugin.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
skeleton_3d_editor_plugin.h Add simple auto mapping to BoneMapper 2022-08-23 16:43:33 +09:00
skeleton_ik_3d_editor_plugin.cpp
skeleton_ik_3d_editor_plugin.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
sprite_2d_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
sprite_2d_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
sprite_frames_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
sprite_frames_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
style_box_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
style_box_editor_plugin.h Improve StyleBox preview 2022-05-26 11:57:56 +02:00
sub_viewport_preview_editor_plugin.cpp
sub_viewport_preview_editor_plugin.h
text_editor.cpp Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
text_editor.h Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
texture_3d_editor_plugin.cpp Rename shader parameter uniform setter/getter methods for consistency 2022-08-04 23:17:06 +02:00
texture_3d_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
texture_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
texture_editor_plugin.h
texture_layered_editor_plugin.cpp Rename shader parameter uniform setter/getter methods for consistency 2022-08-04 23:17:06 +02:00
texture_layered_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
texture_region_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
texture_region_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
theme_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
theme_editor_plugin.h Use type icons in Theme editor import tab 2022-05-26 23:05:17 -05:00
theme_editor_preview.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
theme_editor_preview.h Tweak minsize of editor ColorPickerButtons 2022-05-19 15:20:46 +02:00
version_control_editor_plugin.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
version_control_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
visual_shader_editor_plugin.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
visual_shader_editor_plugin.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
voxel_gi_editor_plugin.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
voxel_gi_editor_plugin.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00