Merge pull request #114885 from ryevdokimov/fix-modified-shortcut-macos

Fix modified editor shortcuts being erased on MacOS
This commit is contained in:
Thaddeus Crews 2026-01-12 11:19:14 -06:00
commit fd71f0c536
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -1955,7 +1955,6 @@ void EditorSettings::add_shortcut(const String &p_path, const Ref<Shortcut> &p_s
p_shortcut->set_name(shortcut_name);
}
shortcuts[p_path] = p_shortcut;
shortcuts[p_path]->set_meta("customized", true);
}
void EditorSettings::remove_shortcut(const String &p_path) {
@ -2084,7 +2083,7 @@ 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.
if (!sc->has_meta("customized")) {
if (Shortcut::is_event_array_equal(sc->get_events(), sc->get_meta("original"))) {
sc->set_events(events);
}