diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-27 20:14:59 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-06-27 20:14:59 -0300 |
commit | ba5bc57816999804e3c392e9d1f94b528baa8c18 (patch) | |
tree | a1ab244a844c14dae70c0e2c928f5ae3dff0f362 /scene/main | |
parent | 972c2ad09f6a89e45e61987c9aa89cc3716d2b2b (diff) |
Figured out a way to fix event propagation for shortcuts and some other cases so they properly stop shortcuts if a modal window is open, closes #4848
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/viewport.cpp | 3 | ||||
-rw-r--r-- | scene/main/viewport.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index f09fac6c71..ff8f0d05f1 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2502,6 +2502,9 @@ Variant Viewport::gui_get_drag_data() const { return gui.drag_data; } +Control *Viewport::get_modal_stack_top() const { + return gui.modal_stack.size()?gui.modal_stack.back()->get():NULL; +} String Viewport::get_configuration_warning() const { diff --git a/scene/main/viewport.h b/scene/main/viewport.h index 545020dfc7..aaa640e0e6 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -374,6 +374,7 @@ public: bool gui_has_modal_stack() const; Variant gui_get_drag_data() const; + Control *get_modal_stack_top() const; virtual String get_configuration_warning() const; |