summaryrefslogtreecommitdiffstats
path: root/scene/gui/dialogs.cpp
diff options
context:
space:
mode:
authorJames Buck <jamesbuck11@gmail.com>2019-11-24 23:07:33 -0600
committerJames Buck <jamesbuck11@gmail.com>2019-11-24 23:39:55 -0600
commit5f451e0fb27392cca4b1e33d4a43a50b94d88115 (patch)
tree025823795bbd2778776b20056d5237366c20e4a5 /scene/gui/dialogs.cpp
parent636bc5c32f07050fb387a7f8f5f78f7dc9aef7be (diff)
downloadredot-engine-5f451e0fb27392cca4b1e33d4a43a50b94d88115.tar.gz
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().
Diffstat (limited to 'scene/gui/dialogs.cpp')
-rw-r--r--scene/gui/dialogs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index a1b584bad6..b6e647d1af 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -161,7 +161,7 @@ void WindowDialog::_gui_input(const Ref<InputEvent> &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;