summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorEric M <itsjusteza@gmail.com>2021-01-15 10:37:45 +1000
committerEric M <itsjusteza@gmail.com>2021-01-15 10:37:45 +1000
commitedc91f71f881af868b17ff239e7e10414d167439 (patch)
tree7d06776e6a827c143fff0a6966552d376a78ed82 /scene
parent011d201046d3957e5232435fd560f803798c26f9 (diff)
Fixed popup not calculating size correctly before adjusting its rect.
Diffstat (limited to 'scene')
-rw-r--r--scene/main/window.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 0a541a2d07..d4e1619acb 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -1039,6 +1039,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);