From 68d6dbe7237011f5c97390b9a7102abef5b67bd4 Mon Sep 17 00:00:00 2001 From: NejcZdovc Date: Thu, 17 Nov 2016 06:01:22 +0100 Subject: [PATCH] Fixed default keymap selection in popover; Fixed keymap default image --- .../popover/tab/keymap/keymap-tab.component.html | 4 ++-- .../popover/tab/keymap/keymap-tab.component.scss | 11 +++++++++++ .../popover/tab/keymap/keymap-tab.component.ts | 14 +++++++++----- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/components/popover/tab/keymap/keymap-tab.component.html b/src/components/popover/tab/keymap/keymap-tab.component.html index 14df4822..8dd1adc7 100644 --- a/src/components/popover/tab/keymap/keymap-tab.component.html +++ b/src/components/popover/tab/keymap/keymap-tab.component.html @@ -2,13 +2,13 @@ Switch to keymap:
-
+
{ return { id: keymap.abbreviation, @@ -36,6 +31,14 @@ export class KeymapTabComponent implements OnInit, Tab { }; }); + this.keymapOptions = [ + { + id: '-1', + text: 'Switch to keymap' + }, + ...this.keymapOptions + ]; + this.fromKeyAction(this.defaultKeyAction); } @@ -56,6 +59,7 @@ export class KeymapTabComponent implements OnInit, Tab { if (!(keyAction instanceof SwitchKeymapAction)) { return false; } + let switchKeymapAction: SwitchKeymapAction = keyAction; this.selectedKeymap = this.keymaps .find((keymap: Keymap) => keymap.abbreviation === switchKeymapAction.keymapAbbreviation);