From 5f451e0fb27392cca4b1e33d4a43a50b94d88115 Mon Sep 17 00:00:00 2001 From: James Buck Date: Sun, 24 Nov 2019 23:07:33 -0600 Subject: [PATCH] Fix WindowDialog moving when resized from the left/top edge get_combined_minimum_size() must be used in order to consider the min size specified by the user when determining how far the left/top edge is allowed to move. Otherwise the dialog may think it can shrink further than it should, causing the right/bottom edge to move when the rect size is fixed in set_size(). --- scene/gui/dialogs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index a1b584bad63..b6e647d1afd 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -161,7 +161,7 @@ void WindowDialog::_gui_input(const Ref &p_event) { global_pos.y = MAX(global_pos.y, 0); // Ensure title bar stays visible. Rect2 rect = get_rect(); - Size2 min_size = get_minimum_size(); + Size2 min_size = get_combined_minimum_size(); if (drag_type == DRAG_MOVE) { rect.position = global_pos - drag_offset;