Clicking backgrd. dimming of editor popup stops input event propagation
A click on the dimmed background of a popup in the editor should stop the input event from propagating to the background. This solution reuses the system introduced in commitefc3ffb8
, taking advantage of the hide() notifications from the modal where we will set the flag "pass_on_modal_close_click(false)" to stop event handling at the viewport input event handling. The viewport first hides the modal and after marks the input as handled if the flag mentioned above is set. Fixes #36341 (cherry picked from commit35bc88ca34
)
This commit is contained in:
parent
e30a0a30b6
commit
f144ec9e67
1 changed files with 3 additions and 1 deletions
|
@ -247,8 +247,10 @@ void WindowDialog::_notification(int p_what) {
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_POPUP_HIDE: {
|
case NOTIFICATION_POPUP_HIDE: {
|
||||||
if (get_tree() && Engine::get_singleton()->is_editor_hint() && EditorNode::get_singleton() && !was_editor_dimmed)
|
if (get_tree() && Engine::get_singleton()->is_editor_hint() && EditorNode::get_singleton() && !was_editor_dimmed) {
|
||||||
EditorNode::get_singleton()->dim_editor(false);
|
EditorNode::get_singleton()->dim_editor(false);
|
||||||
|
set_pass_on_modal_close_click(false);
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue