Merge pull request #95249 from KoBeWi/pluginector

Fix usage of `add_inspector_plugin()`
This commit is contained in:
Rémi Verschelde 2024-08-17 00:46:35 +02:00
commit 9bb86dfa4a
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 4 additions and 5 deletions

View File

@ -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() {

View File

@ -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() {