diff --git a/src/components/svg/wrap/svg-keyboard-wrap.component.ts b/src/components/svg/wrap/svg-keyboard-wrap.component.ts index 3001849b..15f962f8 100644 --- a/src/components/svg/wrap/svg-keyboard-wrap.component.ts +++ b/src/components/svg/wrap/svg-keyboard-wrap.component.ts @@ -93,8 +93,8 @@ export class SvgKeyboardWrapComponent implements OnInit, OnChanges { const keymapChanges = changes['keymap']; if (keymapChanges) { this.popoverShown = false; + this.layers = this.keymap.layers; if (keymapChanges.previousValue.abbreviation !== keymapChanges.currentValue.abbreviation) { - this.layers = this.keymap.layers; this.currentLayer = 0; this.keybindAnimationEnabled = keymapChanges.isFirstChange(); } else { diff --git a/src/store/reducers/keymap.ts b/src/store/reducers/keymap.ts index eb11041e..8c559da0 100644 --- a/src/store/reducers/keymap.ts +++ b/src/store/reducers/keymap.ts @@ -119,6 +119,7 @@ export default function (state = initialState, action: Action): KeymapState { const layer: Layer = changedKeymap.layers[layerIndex]; const changedLayer: Layer = new Layer(); Object.assign(changedLayer, layer); + changedKeymap.layers = changedKeymap.layers.slice(); changedKeymap.layers[layerIndex] = changedLayer; const moduleIndex: number = action.payload.module;