Shortcut: Rename shortcut property to event
Having a property which has the same name as its class leads to confusing situations (e.g. `BaseButton` has a `shortcut` property of type `Shortcut` which has a `shortcut` property of type `InputEvent`). Also renames `is_event` to `matches_event`, and `is_valid` to `has_valid_event` to better reflect what the methods check.
This commit is contained in:
@@ -605,12 +605,12 @@ void AnimationBezierTrackEdit::_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_selection")->is_shortcut(p_event)) {
|
||||
if (ED_GET_SHORTCUT("animation_editor/duplicate_selection")->matches_event(p_event)) {
|
||||
duplicate_selection();
|
||||
accept_event();
|
||||
}
|
||||
|
||||
if (ED_GET_SHORTCUT("animation_editor/delete_selection")->is_shortcut(p_event)) {
|
||||
if (ED_GET_SHORTCUT("animation_editor/delete_selection")->matches_event(p_event)) {
|
||||
delete_selection();
|
||||
accept_event();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user