diff options
author | Eric M <itsjusteza@gmail.com> | 2023-01-21 16:40:03 +1000 |
---|---|---|
committer | Eric M <itsjusteza@gmail.com> | 2023-01-21 16:40:03 +1000 |
commit | 9da04d8374714fe588502a78e69a7797c27cee06 (patch) | |
tree | e90a40bf2c90e500561f7c5a414d33cc806ef6c8 | |
parent | 4db3716d8d9bbc95c031818b190002602558b0f2 (diff) |
Fix shortcuts which have feature override defined reverting to default when user changes the shortcut to be same as non-overriden.
-rw-r--r-- | editor/editor_settings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 8ca98e6f76..dc6b64ddc1 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -1485,11 +1485,11 @@ void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, c } // Override the existing shortcut only if it wasn't customized by the user (i.e. still "original"). + sc->set_meta("original", events.duplicate(true)); + if (Shortcut::is_event_array_equal(sc->get_events(), sc->get_meta("original"))) { sc->set_events(events); } - - sc->set_meta("original", events.duplicate(true)); } Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, Key p_keycode) { |