diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2023-03-02 20:37:02 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2023-04-29 10:51:00 +0800 |
commit | d24ee551ecb09209ead942a00e88ea42b66b15be (patch) | |
tree | c683dfae43f80473b1a1ce0e6c833540384bcabf /editor/plugins/tiles/tile_set_atlas_source_editor.cpp | |
parent | 9f12e7b52d944281a39b7d3a33de6700c76cc23a (diff) | |
download | redot-engine-d24ee551ecb09209ead942a00e88ea42b66b15be.tar.gz |
Allow EditorInspector to change its property name style when necessary
Previously, an EditorInspector's property name can only be set from
outside. Inspectors used for settings needs to respond to changes in
editor settings. So a few boilerplate code is almost always needed,
including watching for a certain editor setting in `_notification()`.
This commit adds a `set_use_settings_style()` function to tell the
inspector to watch for editor settings changes on its own.
Diffstat (limited to 'editor/plugins/tiles/tile_set_atlas_source_editor.cpp')
-rw-r--r-- | editor/plugins/tiles/tile_set_atlas_source_editor.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp index 42c296e825..a8c3b8e8d5 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp @@ -34,7 +34,6 @@ #include "editor/editor_inspector.h" #include "editor/editor_node.h" -#include "editor/editor_property_name_processor.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "editor/editor_undo_redo_manager.h" @@ -2415,14 +2414,6 @@ void TileSetAtlasSourceEditor::_notification(int p_what) { } } } break; - - case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { - if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/localize_settings")) { - EditorPropertyNameProcessor::Style style = EditorPropertyNameProcessor::get_singleton()->get_settings_style(); - atlas_source_inspector->set_property_name_style(style); - tile_inspector->set_property_name_style(style); - } - } break; } } @@ -2492,7 +2483,6 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { tile_inspector->edit(tile_proxy_object); tile_inspector->set_use_folding(true); tile_inspector->connect("property_selected", callable_mp(this, &TileSetAtlasSourceEditor::_inspector_property_selected)); - tile_inspector->set_property_name_style(EditorPropertyNameProcessor::get_singleton()->get_settings_style()); middle_vbox_container->add_child(tile_inspector); tile_inspector_no_tile_selected_label = memnew(Label); @@ -2544,7 +2534,6 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { atlas_source_inspector->set_v_size_flags(SIZE_EXPAND_FILL); atlas_source_inspector->set_show_categories(true); atlas_source_inspector->edit(atlas_source_proxy_object); - atlas_source_inspector->set_property_name_style(EditorPropertyNameProcessor::get_singleton()->get_settings_style()); middle_vbox_container->add_child(atlas_source_inspector); // -- Right side -- |