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
No known key found for this signature in database
GPG key ID: C3336907360768E1
14 changed files with 14 additions and 14 deletions

View file

@ -3646,7 +3646,7 @@ void ScriptEditorPlugin::edited_scene_changed() {
ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
editor = p_node;
script_editor = memnew(ScriptEditor(p_node));
editor->get_viewport()->add_child(script_editor);
editor->get_main_control()->add_child(script_editor);
script_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
script_editor->hide();