summaryrefslogtreecommitdiff
path: root/scene/gui/dialogs.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2020-06-30 14:01:10 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-06-30 14:02:37 -0300
commitb19ab945acec594a17e8a11cec53eec17ad4c4a5 (patch)
tree1659295371b6022a7ade300b01e9f4aae09ab96c /scene/gui/dialogs.cpp
parent84e9e58084d12771d04cd2ece16b32720867fcbd (diff)
Make dialogs exclusive by default, fixes #37732
Also fix on set_visible, not creating exclusive children as it should.
Diffstat (limited to 'scene/gui/dialogs.cpp')
-rw-r--r--scene/gui/dialogs.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index c6897fc684..bacc65c7bf 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -51,7 +51,9 @@ void AcceptDialog::_input_from_window(const Ref<InputEvent> &p_event) {
}
void AcceptDialog::_parent_focused() {
- _cancel_pressed();
+ if (!is_exclusive()) {
+ _cancel_pressed();
+ }
}
void AcceptDialog::_notification(int p_what) {
@@ -295,6 +297,7 @@ AcceptDialog::AcceptDialog() {
set_wrap_controls(true);
set_visible(false);
set_transient(true);
+ set_exclusive(true);
bg = memnew(Panel);
add_child(bg);