summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-12 10:18:02 +0200
committerGitHub <noreply@github.com>2019-07-12 10:18:02 +0200
commit7a643acb1f47cf9c009a55cc2234409a25c01c7e (patch)
tree000feb5899786be014d3ca36bd7791a42720dbc3
parentb6c10c2e176db340e951934d7246fb39b584bf00 (diff)
parentc16e764bb2ae2f038abac8b1fc2518bba3dbf3db (diff)
Merge pull request #30517 from kawa-yoiko/modal-freeze
Fix multiple popup freezing
-rw-r--r--scene/main/viewport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 24c8ee31b2..d147d43f50 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2579,7 +2579,7 @@ void Viewport::_drop_physics_mouseover() {
List<Control *>::Element *Viewport::_gui_show_modal(Control *p_control) {
- gui.modal_stack.push_back(p_control);
+ List<Control *>::Element *node = gui.modal_stack.push_back(p_control);
if (gui.key_focus)
p_control->_modal_set_prev_focus_owner(gui.key_focus->get_instance_id());
else
@@ -2590,7 +2590,7 @@ List<Control *>::Element *Viewport::_gui_show_modal(Control *p_control) {
_drop_mouse_focus();
}
- return gui.modal_stack.back();
+ return node;
}
Control *Viewport::_gui_get_focus_owner() {