Merge pull request #80219 from YeldhamDev/override_all_the_things

Improve `Window._get_contents_minimum_size()`'s code
This commit is contained in:
Rémi Verschelde 2023-08-03 15:33:37 +02:00
commit 725beaa7af
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 5 additions and 3 deletions

View File

@ -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 {