1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Fix editor shortcuts overrides overwriting user configured shortcuts.

This commit is contained in:
bruvzg
2022-08-17 08:04:38 +03:00
parent 19e2f30a55
commit da808d4fd3

View File

@@ -1477,8 +1477,11 @@ void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, c
}
}
// Directly override the existing shortcut.
sc->set_events(events);
// Override the existing shortcut only if it wasn't customized by the user (i.e. still "original").
if (Shortcut::is_event_array_equal(sc->get_events(), sc->get_meta("original"))) {
sc->set_events(events);
}
sc->set_meta("original", events.duplicate(true));
}