Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename EditorInterface get_editor_viewport to get_editor_main_control #44524

Merged
merged 1 commit into from
Dec 28, 2020

Conversation

madmiraal
Copy link
Contributor

@madmiraal madmiraal commented Dec 19, 2020

As originally identified here, EditorInterface.get_editor_viewport() doesn't return a Viewport, it returns a Control. More specifically, as described in the documentation, it returns the main editor control. Note: It happens to be a VBoxContainer, but this is an implementation detail; so it should not affect the naming of the method.

This PR renames EditorInterface.get_editor_viewport() to EditorInterface.get_editor_main_control() along with the underlying EditorNode method and variable.

Part of #16863.

@akien-mga akien-mga merged commit 76d4fab into godotengine:master Dec 28, 2020
@akien-mga
Copy link
Member

Thanks!

akien-mga added a commit to akien-mga/godot that referenced this pull request Dec 28, 2020
…rNode::get_viewport()

Fixes godotengine#44761, was a regression from godotengine#44524.

The PR passed CI because EditorNode::get_viewport() used to shadow Node::get_viewport()
(which was a bug in itself, fixed by godotengine#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.
@madmiraal madmiraal deleted the rename-editor-viewport branch December 29, 2020 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants