EEPROM-Settings: Setting a new default layer should move there too

When selecting a new default layer via Focus, we should be moving there too,
because there may be no other way to switch to the new layer, and having to
reboot the keyboard for changes to take effect is not our desired behaviour.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/520/head
Gergely Nagy 6 years ago
parent 41fe0c95ff
commit 977c2e377f
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -53,6 +53,8 @@ uint8_t EEPROMSettings::default_layer(uint8_t layer) {
if (layer == 0xff) if (layer == 0xff)
return settings_.default_layer; return settings_.default_layer;
if (settings_.default_layer != layer)
Layer.move(layer);
settings_.default_layer = layer; settings_.default_layer = layer;
update(); update();
return settings_.default_layer; return settings_.default_layer;

Loading…
Cancel
Save