You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
use ED_IS_SHORTCUT macro instead of matches_event
This commit is contained in:
@@ -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"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user