fix: only flash the remapped key (#697)

This commit is contained in:
Róbert Kiss
2018-06-24 23:39:32 +02:00
committed by László Monda
parent a208a264c7
commit 06e76e5e0f

View File

@@ -153,11 +153,8 @@ export function reducer(state = initialState, action: Action & { payload?: any }
}
if (keyActionRemap.remapOnAllKeymap || keymap.abbreviation === newKeymap.abbreviation) {
keymap = new Keymap(keymap);
keymap.layers = keymap.layers.map((layer, index) => {
if (keyActionRemap.remapOnAllLayer || index === layerIndex || isSwitchLayerAction) {
layer = new Layer(layer);
const clonedAction = KeyActionHelper.createKeyAction(newKeyAction);
// If the key action is a SwitchLayerAction then set the same SwitchLayerAction