diff options
| author | Juan Linietsky | 2016-06-27 11:22:13 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-06-27 11:22:13 -0300 |
| commit | 88e28af5e360d826ee0e83944dff0003375e3daf (patch) | |
| tree | ea6a696d16afda66c488f4866f44c39d2d2703e2 /scene/gui/control.cpp | |
| parent | d41b7a66e9e01b55310d68e216139d6b6cc712f1 (diff) | |
| download | godot-88e28af5e360d826ee0e83944dff0003375e3daf.tar.gz godot-88e28af5e360d826ee0e83944dff0003375e3daf.tar.zst godot-88e28af5e360d826ee0e83944dff0003375e3daf.zip | |
Add a small workaround to avoid modal tabs to be closed if they are spawned in the same frame, closes #3837
Diffstat (limited to 'scene/gui/control.cpp')
| -rw-r--r-- | scene/gui/control.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 8f96fbbaf..fc27c0d24 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -762,6 +762,11 @@ bool Control::is_window_modal_on_top() const { return get_viewport()->_gui_is_modal_on_top(this); } +uint64_t Control::get_modal_frame() const { + + return data.modal_frame; +} + Size2 Control::get_minimum_size() const { @@ -1837,6 +1842,7 @@ void Control::show_modal(bool p_exclusive) { raise(); data.modal_exclusive=p_exclusive; data.MI=get_viewport()->_gui_show_modal(this); + data.modal_frame=OS::get_singleton()->get_frames_drawn(); } @@ -2547,6 +2553,7 @@ Control::Control() { data.parent_canvas_item=NULL; data.scale=Vector2(1,1); data.drag_owner=0; + data.modal_frame=0; for (int i=0;i<4;i++) { |
