godot/editor
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
..
debugger Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
export Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
fileserver Add a new HashSet template 2022-05-20 22:40:38 +02:00
icons Add linear/cubic angle interpolation to Animation interpolation type 2022-08-27 07:58:22 +09:00
import Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
plugins Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
translations i18n: Sync editor translations with Weblate 2022-08-05 03:32:15 +02:00
action_map_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
action_map_editor.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
animation_bezier_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
animation_bezier_editor.h Merge pull request #64647 from TokageItLab/auto-tangent 2022-08-23 18:17:15 +02:00
animation_track_editor_plugins.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
animation_track_editor_plugins.h Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init 2022-05-02 16:28:25 +02:00
animation_track_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
animation_track_editor.h Add optimization for Animation::ValueTrack 2022-08-27 22:59:33 +09:00
array_property_edit.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
array_property_edit.h
audio_stream_preview.cpp Remove Signal connect binds 2022-07-29 16:26:13 +02:00
audio_stream_preview.h Implement BPM support 2022-07-23 07:31:17 +02:00
code_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
code_editor.h Adding shader preprocessor support 2022-07-22 22:51:57 +02:00
connections_dialog.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
connections_dialog.h Merge pull request #64573 from KoBeWi/signal_name_plagiarism 2022-08-26 00:00:44 +02:00
create_dialog.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
create_dialog.h Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
dependency_editor.cpp Show dependency warning when removing remaps and fallback if translation 2022-08-03 12:31:29 +02:00
dependency_editor.h Show dependency warning when removing remaps and fallback if translation 2022-08-03 12:31:29 +02:00
dictionary_property_edit.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
dictionary_property_edit.h
doc_tools.cpp Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
doc_tools.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
editor_about.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_about.h Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_asset_installer.cpp Rename every instance of "OGG" to "Ogg" 2022-07-28 16:41:38 -03:00
editor_asset_installer.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
editor_atlas_packer.cpp Use bresenham_line() in EditorAtlasPacker::chart_pack 2022-02-21 19:52:47 +01:00
editor_atlas_packer.h Use bresenham_line() in EditorAtlasPacker::chart_pack 2022-02-21 19:52:47 +01:00
editor_audio_buses.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_audio_buses.h Add the button pressed to some signals in Tree 2022-05-21 17:16:52 +02:00
editor_autoload_settings.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_autoload_settings.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
editor_build_profile.cpp Add Text Server related options to the build profiles editor. 2022-08-03 15:06:43 +03:00
editor_build_profile.h Add Text Server related options to the build profiles editor. 2022-08-03 15:06:43 +03:00
editor_builders.py [Editor build] Use smaller .mo files instead of .po, if gettext is available. 2022-03-24 21:17:32 +02:00
editor_command_palette.cpp Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
editor_command_palette.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
editor_data.cpp Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
editor_data.h Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
editor_dir_dialog.cpp Remove Signal connect binds 2022-07-29 16:26:13 +02:00
editor_dir_dialog.h Add a new HashSet template 2022-05-20 22:40:38 +02:00
editor_feature_profile.cpp Rebuild the trees in the EditorFeatureProfile dialog when the editor theme changes 2022-08-05 19:17:58 +03:00
editor_feature_profile.h Add a new HashSet template 2022-05-20 22:40:38 +02:00
editor_file_dialog.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_file_dialog.h Seperate filter and description in FileDialog.add_filter() 2022-07-09 10:51:45 -05:00
editor_file_system.cpp Add Startup benchmarking support 2022-08-19 14:21:43 +02:00
editor_file_system.h Remove ThreadWorkPool, replace by WorkerThreadPool 2022-07-25 15:39:50 +02:00
editor_folding.cpp Move editor paths into the EditorPaths class 2022-07-29 11:07:30 -05:00
editor_folding.h Add a new HashSet template 2022-05-20 22:40:38 +02:00
editor_fonts.cpp Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00
editor_fonts.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
editor_help_search.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
editor_help_search.h Fix editor crash in built-in help when script inheritance chain changes. 2022-05-17 08:50:32 -07:00
editor_help.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_help.h Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_inspector.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_inspector.h Remove Inspector tooltip hack that never actually worked 2022-08-26 17:22:13 +03:00
editor_layouts_dialog.cpp
editor_layouts_dialog.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
editor_locale_dialog.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
editor_locale_dialog.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
editor_log.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_log.h Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_native_shader_source_visualizer.cpp Make TabBar/Container default their alignments to the left instead of center 2022-03-17 18:12:23 -03:00
editor_native_shader_source_visualizer.h
editor_node.cpp Merge pull request #64961 from faisal-alam09/Bugfix-#64836-Placeholder-scene-tab-not-removed-when-new-scene-created 2022-08-28 18:06:44 +02:00
editor_node.h [macOS] Extend editor contents to the window titlebar for better space usage. 2022-08-26 15:12:43 +03:00
editor_path.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_path.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
editor_paths.cpp Move editor paths into the EditorPaths class 2022-07-29 11:07:30 -05:00
editor_paths.h Move editor paths into the EditorPaths class 2022-07-29 11:07:30 -05:00
editor_plugin_settings.cpp Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
editor_plugin_settings.h Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
editor_plugin.cpp Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
editor_plugin.h Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
editor_properties_array_dict.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_properties_array_dict.h Implement support for loading system fonts on Linux, macOS / iOS and Windows. 2022-07-26 08:38:05 +03:00
editor_properties.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_properties.h [macOS export] Simplify code signing options, add support for rcodesign tool for signing and notarization. 2022-08-26 14:23:31 +03:00
editor_property_name_processor.cpp [macOS export] Simplify code signing options, add support for rcodesign tool for signing and notarization. 2022-08-26 14:23:31 +03:00
editor_property_name_processor.h Replace most uses of Map by HashMap 2022-05-16 10:37:48 +02:00
editor_quick_open.cpp Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
editor_quick_open.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
editor_resource_picker.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_resource_picker.h Disable editing properties in foreign resources 2022-08-23 23:16:13 +01:00
editor_resource_preview.cpp Swap arguments of ResourceSaver.save() 2022-07-29 19:53:09 +02:00
editor_resource_preview.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
editor_run_native.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
editor_run_native.h Add readable export errors. 2022-06-08 17:55:46 +03:00
editor_run_script.cpp Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
editor_run_script.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
editor_run.cpp Overhaul CLI argument forwarding to processes started by the editor 2022-08-19 11:15:56 +02:00
editor_run.h Implement Running Godot as Movie Writer 2022-06-21 11:28:47 +02:00
editor_scale.cpp
editor_scale.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
editor_sectioned_inspector.cpp [GDExtension] Fix _property_can_revert and _property_get_revert methods using incorrect string type. 2022-08-23 14:58:28 +03:00
editor_sectioned_inspector.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
editor_settings_dialog.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
editor_settings_dialog.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
editor_settings.cpp Fix editor shortcuts overrides overwriting user configured shortcuts. 2022-08-27 20:25:13 +03:00
editor_settings.h Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
editor_spin_slider.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_spin_slider.h Implement Quaternion Editor 2022-08-24 22:04:49 +09:00
editor_themes.cpp Extract editor color map and simplify SVG color conversion 2022-08-24 15:59:14 +03:00
editor_themes.h Extract editor color map and simplify SVG color conversion 2022-08-24 15:59:14 +03:00
editor_title_bar.cpp [macOS] Extend editor contents to the window titlebar for better space usage. 2022-08-26 15:12:43 +03:00
editor_title_bar.h [macOS] Extend editor contents to the window titlebar for better space usage. 2022-08-26 15:12:43 +03:00
editor_toaster.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_toaster.h Replace most uses of Map by HashMap 2022-05-16 10:37:48 +02:00
editor_translation_parser.cpp Add a new HashSet template 2022-05-20 22:40:38 +02:00
editor_translation_parser.h
editor_translation.cpp Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
editor_translation.h
editor_undo_redo_manager.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
editor_undo_redo_manager.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
editor_vcs_interface.cpp Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
editor_vcs_interface.h Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
editor_zoom_widget.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
editor_zoom_widget.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
filesystem_dock.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
filesystem_dock.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
find_in_files.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
find_in_files.h Add a new HashSet template 2022-05-20 22:40:38 +02:00
groups_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
groups_editor.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
import_defaults_editor.cpp Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
import_defaults_editor.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
import_dock.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
import_dock.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
inspector_dock.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
inspector_dock.h Disable editing properties in foreign resources 2022-08-23 23:16:13 +01:00
localization_editor.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
localization_editor.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
multi_node_edit.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
multi_node_edit.h
node_dock.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
node_dock.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
plugin_config_dialog.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
plugin_config_dialog.h Improve plugin dialog UX 2022-05-07 23:19:55 +02:00
pot_generator.cpp Add a new HashSet template 2022-05-20 22:40:38 +02:00
pot_generator.h Add a new HashSet template 2022-05-20 22:40:38 +02:00
progress_dialog.cpp Rename Control PRESET_WIDE to PRESET_FULL_RECT 2022-07-18 20:08:11 -05:00
progress_dialog.h Replace most uses of Map by HashMap 2022-05-16 10:37:48 +02:00
project_converter_3_to_4.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
project_converter_3_to_4.h Add conversion for the RPC attributes in C# 2022-08-06 15:56:46 +02:00
project_manager.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
project_manager.h Migrate project list to separate config file. 2022-08-07 07:46:52 -04:00
project_settings_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
project_settings_editor.h Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
property_selector.cpp Remove excessive editor/property_editor.h includes 2022-08-01 17:19:11 +03:00
property_selector.h Remove excessive editor/property_editor.h includes 2022-08-01 17:19:11 +03:00
register_exporters.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
rename_dialog.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
rename_dialog.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
reparent_dialog.cpp Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialog 2022-07-09 10:47:08 -05:00
reparent_dialog.h Add a new HashSet template 2022-05-20 22:40:38 +02:00
scene_create_dialog.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
scene_create_dialog.h Rework scene creation dialog 2022-06-21 15:42:56 +02:00
scene_tree_dock.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
scene_tree_dock.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
scene_tree_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
scene_tree_editor.h Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
script_create_dialog.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
script_create_dialog.h Zero initialize all pointer class and struct members 2022-04-04 19:49:50 +02:00
SCsub i18n: Sync editor translations with Weblate 2022-07-27 15:59:43 +02:00
shader_create_dialog.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
shader_create_dialog.h Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
shader_globals_editor.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
shader_globals_editor.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
template_builders.py