1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Editor: Fix invalid use of Node::get_viewport() after rename of EditorNode::get_viewport()

Fixes #44761, was a regression from #44524.

The PR passed CI because EditorNode::get_viewport() used to shadow Node::get_viewport()
(which was a bug in itself, fixed by #44524), so once it was renamed the existing code
relying on it fell back to the now available Node::get_viewport().
This might bite some thirdparty modules too.
This commit is contained in:
Rémi Verschelde
2020-12-28 19:51:39 +01:00
parent a04b9669e8
commit 44357ddc28
14 changed files with 14 additions and 14 deletions

View File

@@ -297,7 +297,7 @@ MeshLibraryEditorPlugin::MeshLibraryEditorPlugin(EditorNode *p_node) {
EDITOR_DEF("editors/grid_map/preview_size", 64);
mesh_library_editor = memnew(MeshLibraryEditor(p_node));
p_node->get_viewport()->add_child(mesh_library_editor);
p_node->get_main_control()->add_child(mesh_library_editor);
mesh_library_editor->set_anchors_and_offsets_preset(Control::PRESET_TOP_WIDE);
mesh_library_editor->set_end(Point2(0, 22));
mesh_library_editor->hide();