diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-08-17 00:46:35 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-08-17 00:46:35 +0200 |
commit | 9bb86dfa4a7f8c9b3e783156214dca8a9dc2439e (patch) | |
tree | 149a5456fb884ad65a6c2d3a0bef2b17db37416d /editor/plugins/tiles | |
parent | 5cb01a0e099e7112e56431e2cda0bf0f8deb442b (diff) | |
parent | 8623a753801a6babb1902a179e2b9541a0d4c323 (diff) | |
download | redot-engine-9bb86dfa4a7f8c9b3e783156214dca8a9dc2439e.tar.gz |
Merge pull request #95249 from KoBeWi/pluginector
Fix usage of `add_inspector_plugin()`
Diffstat (limited to 'editor/plugins/tiles')
-rw-r--r-- | editor/plugins/tiles/tile_set_atlas_source_editor.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp index 7e34a36a6e..224c4e434f 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp @@ -2612,7 +2612,6 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { atlas_source_inspector->set_v_size_flags(SIZE_EXPAND_FILL); atlas_source_inspector->set_show_categories(false, true); atlas_source_inspector->set_use_doc_hints(true); - atlas_source_inspector->add_inspector_plugin(memnew(TileSourceInspectorPlugin)); middle_vbox_container->add_child(atlas_source_inspector); // -- Right side -- @@ -2740,9 +2739,8 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { add_child(confirm_auto_create_tiles); // Inspector plugin. - Ref<EditorInspectorPluginTileData> tile_data_inspector_plugin; - tile_data_inspector_plugin.instantiate(); - EditorInspector::add_inspector_plugin(tile_data_inspector_plugin); + EditorInspector::add_inspector_plugin(memnew(EditorInspectorPluginTileData)); + EditorInspector::add_inspector_plugin(memnew(TileSourceInspectorPlugin)); } TileSetAtlasSourceEditor::~TileSetAtlasSourceEditor() { diff --git a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp index 22ef779b8d..305407efdb 100644 --- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp @@ -534,7 +534,6 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() { scenes_collection_source_inspector = memnew(EditorInspector); scenes_collection_source_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED); scenes_collection_source_inspector->set_use_doc_hints(true); - scenes_collection_source_inspector->add_inspector_plugin(memnew(TileSourceInspectorPlugin)); middle_vbox_container->add_child(scenes_collection_source_inspector); // Tile inspector. @@ -581,6 +580,8 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() { scene_tile_delete_button->set_disabled(true); scene_tile_delete_button->connect(SceneStringName(pressed), callable_mp(this, &TileSetScenesCollectionSourceEditor::_source_delete_pressed)); scenes_bottom_actions->add_child(scene_tile_delete_button); + + EditorInspector::add_inspector_plugin(memnew(TileSourceInspectorPlugin)); } TileSetScenesCollectionSourceEditor::~TileSetScenesCollectionSourceEditor() { |