Skip to content

Commit

Permalink
don't unbind keys from a differen section
Browse files Browse the repository at this point in the history
  • Loading branch information
nstlaurent committed Nov 5, 2023
1 parent e142a5c commit b430da1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Core/Layer/Options/Sections/KeyBindingSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ private void TryUpdateKeyBindingsFromPress(IConsumableInput input)
if (item.Keys[i] != key || item.Command.EqualsIgnoreCase(commandKeys.Command))
continue;

// Don't unbind if key is in automap section and this key is not
if (item.Command.StartsWith("AutoMap", StringComparison.OrdinalIgnoreCase) !=
commandKeys.Command.StartsWith("AutoMap", StringComparison.OrdinalIgnoreCase))
continue;

unbound = item;
m_config.Keys.Remove(key, item.Command);
item.Keys.RemoveAt(i);
Expand Down

0 comments on commit b430da1

Please sign in to comment.