mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
use ED_IS_SHORTCUT macro instead of matches_event
This commit is contained in:
parent
0246230e2b
commit
47dba6bc56
3 changed files with 21 additions and 21 deletions
|
@ -2685,33 +2685,33 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
|
|||
ERR_FAIL_COND(p_event.is_null());
|
||||
|
||||
if (p_event->is_pressed()) {
|
||||
if (ED_GET_SHORTCUT("animation_editor/duplicate_selected_keys")->matches_event(p_event)) {
|
||||
if (ED_IS_SHORTCUT("animation_editor/duplicate_selected_keys", p_event)) {
|
||||
if (!read_only) {
|
||||
emit_signal(SNAME("duplicate_request"), -1.0);
|
||||
}
|
||||
accept_event();
|
||||
}
|
||||
if (ED_GET_SHORTCUT("animation_editor/cut_selected_keys")->matches_event(p_event)) {
|
||||
if (ED_IS_SHORTCUT("animation_editor/cut_selected_keys", p_event)) {
|
||||
if (!read_only) {
|
||||
emit_signal(SNAME("cut_request"));
|
||||
}
|
||||
accept_event();
|
||||
}
|
||||
if (ED_GET_SHORTCUT("animation_editor/copy_selected_keys")->matches_event(p_event)) {
|
||||
if (ED_IS_SHORTCUT("animation_editor/copy_selected_keys", p_event)) {
|
||||
if (!read_only) {
|
||||
emit_signal(SNAME("copy_request"));
|
||||
}
|
||||
accept_event();
|
||||
}
|
||||
|
||||
if (ED_GET_SHORTCUT("animation_editor/paste_keys")->matches_event(p_event)) {
|
||||
if (ED_IS_SHORTCUT("animation_editor/paste_keys", p_event)) {
|
||||
if (!read_only) {
|
||||
emit_signal(SNAME("paste_request"), -1.0);
|
||||
}
|
||||
accept_event();
|
||||
}
|
||||
|
||||
if (ED_GET_SHORTCUT("animation_editor/delete_selection")->matches_event(p_event)) {
|
||||
if (ED_IS_SHORTCUT("animation_editor/delete_selection", p_event)) {
|
||||
if (!read_only) {
|
||||
emit_signal(SNAME("delete_request"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue