mirror of
https://github.com/godotengine/godot.git
synced 2025-01-26 11:51:13 +00:00
Spatial/Canvas Editor: Ignore unhandled input if there is a dialog
This commit is contained in:
parent
ccbf8b42f4
commit
e187762c2d
@ -194,7 +194,7 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2& mouse_pos) {
|
|||||||
|
|
||||||
void CanvasItemEditor::_unhandled_key_input(const InputEvent& p_ev) {
|
void CanvasItemEditor::_unhandled_key_input(const InputEvent& p_ev) {
|
||||||
|
|
||||||
if (!is_visible())
|
if (!is_visible() || window_has_modal_stack())
|
||||||
return;
|
return;
|
||||||
if (p_ev.key.mod.control)
|
if (p_ev.key.mod.control)
|
||||||
// prevent to change tool mode when control key is pressed
|
// prevent to change tool mode when control key is pressed
|
||||||
|
@ -3529,10 +3529,10 @@ void SpatialEditor::_instance_scene() {
|
|||||||
|
|
||||||
void SpatialEditor::_unhandled_key_input(InputEvent p_event) {
|
void SpatialEditor::_unhandled_key_input(InputEvent p_event) {
|
||||||
|
|
||||||
if (!is_visible())
|
if (!is_visible() || window_has_modal_stack())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
EditorNode *en = editor;
|
EditorNode *en = editor;
|
||||||
EditorPlugin *over_plugin = en->get_editor_plugin_over();
|
EditorPlugin *over_plugin = en->get_editor_plugin_over();
|
||||||
|
Loading…
Reference in New Issue
Block a user