summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Sizov <11782833+YuriSizov@users.noreply.github.com>2023-02-17 20:31:52 +0300
committerGitHub <noreply@github.com>2023-02-17 20:31:52 +0300
commit28db611f0f27c37d2d02fc986e9edbb8a8725267 (patch)
tree9499c65dc87901b4df271b37a7e44a830c1d5bdd
parente57aeb49e94a77d9220817709ea198800eac9b5f (diff)
parent9da04d8374714fe588502a78e69a7797c27cee06 (diff)
Merge pull request #71792 from EricEzaM/66428-changing-the-play-shortcut-gets-overwritten-every-restart
Fix shortcuts which have feature override defined reverting to default when user changes the shortcut to be same as non-overridden.
-rw-r--r--editor/editor_settings.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 23e32dcbd8..c90f8e9bf0 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -1490,11 +1490,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) {