godot/editor/plugins/tiles
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
..
atlas_merging_dialog.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
atlas_merging_dialog.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
SCsub Rework the TileSet resource and TileMap nodes: 2021-05-07 18:06:17 +02:00
tile_atlas_view.cpp Rename hint_tooltip to tooltip_text & setget 2022-08-27 01:35:01 +02:00
tile_atlas_view.h Fix tileset image and background sometimes disappearing 2022-08-25 16:18:39 +02:00
tile_data_editors.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
tile_data_editors.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
tile_map_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
tile_map_editor.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
tile_proxies_manager_dialog.cpp Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
tile_proxies_manager_dialog.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
tile_set_atlas_source_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
tile_set_atlas_source_editor.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
tile_set_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
tile_set_editor.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
tile_set_scenes_collection_source_editor.cpp Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED" 2022-08-29 11:11:29 +02:00
tile_set_scenes_collection_source_editor.h Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
tiles_editor_plugin.cpp Remove Signal connect binds 2022-07-29 16:26:13 +02:00
tiles_editor_plugin.h Merge pull request #58361 from V-Sekai/tileset_editor_selection 2022-07-28 17:31:21 +02:00