use ED_IS_SHORTCUT macro instead of matches_event

This commit is contained in:
CookieBadger 2024-02-15 16:26:33 +01:00 committed by emild
parent 0246230e2b
commit 47dba6bc56
3 changed files with 21 additions and 21 deletions

View file

@ -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"));
}