Skip to content

Commit

Permalink
Merge pull request #80219 from YeldhamDev/override_all_the_things
Browse files Browse the repository at this point in the history
Improve `Window._get_contents_minimum_size()`'s code
  • Loading branch information
akien-mga committed Aug 3, 2023
2 parents c97e4a3 + 6d24534 commit 725beaa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scene/main/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1748,9 +1748,11 @@ Rect2i Window::fit_rect_in_parent(Rect2i p_rect, const Rect2i &p_parent_rect) co

Size2 Window::get_contents_minimum_size() const {
ERR_READ_THREAD_GUARD_V(Size2());
Vector2 ms = _get_contents_minimum_size();
GDVIRTUAL_CALL(_get_contents_minimum_size, ms);
return ms;
Vector2 ms;
if (GDVIRTUAL_CALL(_get_contents_minimum_size, ms)) {
return ms;
}
return _get_contents_minimum_size();
}

Size2 Window::get_clamped_minimum_size() const {
Expand Down

0 comments on commit 725beaa

Please sign in to comment.