summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-01-06 07:50:15 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-02-23 13:01:28 +0100
commit90b94498443f72e9c6b17f922a2eba8ce3f04d6b (patch)
treee3b057e9f60f05b71be733c715939afcaf735749 /scene/main
parent59c23c136949afe6c08f601e30af8ae6d40e5949 (diff)
Properly set input as handled when closing modal
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/viewport.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 1ff1f4b6d8..cb5a895574 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2017,6 +2017,9 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
top->notification(Control::NOTIFICATION_MODAL_CLOSE);
top->_modal_stack_remove();
top->hide();
+ // Close modal, set input as handled
+ get_tree()->set_input_as_handled();
+ return;
}
}