Fix 560 delete bind play macro action when macro delete (#576)

* fix(config): delete KeyAction binding of deleted macro

* refactor: use sorter import

* fix(macro): read the macro id from route params

* fix(keyAction): use NoneAction in keyAction mapping
This commit is contained in:
Róbert Kiss
2018-02-11 20:12:12 +01:00
committed by László Monda
parent e545c9d67b
commit 1a413c824e
5 changed files with 49 additions and 6 deletions

View File

@@ -7,6 +7,7 @@ import { SwitchLayerAction } from './switch-layer-action';
import { SwitchKeymapAction, UnresolvedSwitchKeymapAction } from './switch-keymap-action';
import { MouseAction } from './mouse-action';
import { PlayMacroAction } from './play-macro-action';
import { NoneAction } from './none-action';
export class Helper {
@@ -77,6 +78,8 @@ export class Helper {
return new MouseAction().fromJsonObject(keyAction);
case keyActionType.PlayMacroAction:
return new PlayMacroAction().fromJsonObject(keyAction, macros);
case keyActionType.NoneAction:
return new NoneAction();
default:
throw `Invalid KeyAction.keyActionType: "${keyAction.keyActionType}"`;
}