Skip to content

Commit

Permalink
Properly adjust the visible editor rect and make limits respected, cl…
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz authored and amugana committed Jun 28, 2017
1 parent 13afba8 commit ee47832
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ void EditorNode::_notification(int p_what) {
}
editor_selection->update();

scene_root->set_size_override(true, Size2(GlobalConfig::get_singleton()->get("display/window/width"), GlobalConfig::get_singleton()->get("display/window/height")));

ResourceImporterTexture::get_singleton()->update_imports();
}
if (p_what == NOTIFICATION_ENTER_TREE) {
Expand Down
1 change: 1 addition & 0 deletions scene/gui/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,7 @@ Size2 Control::get_parent_area_size() const {

parent_size = get_viewport()->get_visible_rect().size;
}

return parent_size;
}

Expand Down
1 change: 1 addition & 0 deletions scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,7 @@ void Viewport::set_size_override(bool p_enable, const Size2 &p_size, const Vecto
size_override_margin = p_margin;
_update_rect();
_update_stretch_transform();
emit_signal("size_changed");
}

Size2 Viewport::get_size_override() const {
Expand Down

0 comments on commit ee47832

Please sign in to comment.