Ensure all checks of is_action in the editor which are for 'shortcut' use, check the action exactly.
This commit is contained in:
@ -3190,7 +3190,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||
Ref<InputEventKey> k = p_event;
|
||||
|
||||
bool is_command = k.is_valid() && k->is_command_or_control_pressed();
|
||||
if (p_event->is_action("ui_right") && p_event->is_pressed()) {
|
||||
if (p_event->is_action("ui_right", true) && p_event->is_pressed()) {
|
||||
if (!cursor_can_exit_tree) {
|
||||
accept_event();
|
||||
}
|
||||
@ -3208,7 +3208,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||
} else {
|
||||
_go_right();
|
||||
}
|
||||
} else if (p_event->is_action("ui_left") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_left", true) && p_event->is_pressed()) {
|
||||
if (!cursor_can_exit_tree) {
|
||||
accept_event();
|
||||
}
|
||||
@ -3228,21 +3228,21 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||
_go_left();
|
||||
}
|
||||
|
||||
} else if (p_event->is_action("ui_up") && p_event->is_pressed() && !is_command) {
|
||||
} else if (p_event->is_action("ui_up", true) && p_event->is_pressed() && !is_command) {
|
||||
if (!cursor_can_exit_tree) {
|
||||
accept_event();
|
||||
}
|
||||
|
||||
_go_up();
|
||||
|
||||
} else if (p_event->is_action("ui_down") && p_event->is_pressed() && !is_command) {
|
||||
} else if (p_event->is_action("ui_down", true) && p_event->is_pressed() && !is_command) {
|
||||
if (!cursor_can_exit_tree) {
|
||||
accept_event();
|
||||
}
|
||||
|
||||
_go_down();
|
||||
|
||||
} else if (p_event->is_action("ui_page_down") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_page_down", true) && p_event->is_pressed()) {
|
||||
if (!cursor_can_exit_tree) {
|
||||
accept_event();
|
||||
}
|
||||
@ -3280,7 +3280,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||
}
|
||||
|
||||
ensure_cursor_is_visible();
|
||||
} else if (p_event->is_action("ui_page_up") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_page_up", true) && p_event->is_pressed()) {
|
||||
if (!cursor_can_exit_tree) {
|
||||
accept_event();
|
||||
}
|
||||
@ -3317,7 +3317,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||
prev->select(selected_col);
|
||||
}
|
||||
ensure_cursor_is_visible();
|
||||
} else if (p_event->is_action("ui_accept") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_accept", true) && p_event->is_pressed()) {
|
||||
if (selected_item) {
|
||||
//bring up editor if possible
|
||||
if (!edit_selected()) {
|
||||
@ -3326,7 +3326,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||
}
|
||||
}
|
||||
accept_event();
|
||||
} else if (p_event->is_action("ui_select") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_select", true) && p_event->is_pressed()) {
|
||||
if (select_mode == SELECT_MULTI) {
|
||||
if (!selected_item) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user