diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-02-28 13:34:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-28 13:34:06 +0100 |
commit | a6ec6521fae92a245c9d395efda01a120a44324d (patch) | |
tree | a5c012b5c4d4a193aa0d0abdcbe326c343cdeace | |
parent | 8faecd6a470aeef41084a32d74f4a131a5ef42b6 (diff) | |
parent | edc91f71f881af868b17ff239e7e10414d167439 (diff) |
Merge pull request #45201 from EricEzaM/PR/popup-menu-fix
Fixed popup not calculating size correctly before adjusting its rect.
-rw-r--r-- | scene/main/window.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 8198fa41c5..e40e990cf7 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -1035,6 +1035,9 @@ void Window::popup_centered_ratio(float p_ratio) { void Window::popup(const Rect2i &p_screen_rect) { emit_signal("about_to_popup"); + // Update window size to calculate the actual window size based on contents minimum size and minimum size. + _update_window_size(); + if (p_screen_rect != Rect2i()) { set_position(p_screen_rect.position); set_size(p_screen_rect.size); |