Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a conversion for editor shortcuts #100334

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions editor/editor_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ bool EditorSettings::_set_only(const StringName &p_name, const Variant &p_value)

builtin_action_overrides[action_name].clear();
for (int ev_idx = 0; ev_idx < events.size(); ev_idx++) {
#ifndef DISABLE_DEPRECATED
// -3 was introduced in GH-97707 as a way to prevent a clash in device IDs, but as reported in GH-99243, this leads to problems.
// -3 was used during dev-releases, so this conversion helps to revert such affected editor shortcuts.
Ref<InputEvent> x = events[ev_idx];
if (x.is_valid() && x->get_device() == -3) {
x->set_device(-1);
}
#endif // DISABLE_DEPRECATED
im->action_add_event(action_name, events[ev_idx]);
builtin_action_overrides[action_name].push_back(events[ev_idx]);
}
Expand Down