fix: hotkeys editing in user preferences

This commit is contained in:
Alireza authored and Erik Ziegler committed 2021-07-08 10:09:20 +02:00
1 parent bcd4aeb9e4
commit f5ecc753f7
4 files changed
+56 -59

No files matched your search

@@ -11,6 +11,8 @@ import {
} from '@ohif/ui';
import i18n from '@ohif/i18n';
import { hotkeys } from '@ohif/core';
const { availableLanguages, defaultLanguage, currentLanguage } = i18n;
@@ -115,7 +117,11 @@ function ViewerLayout({
currentLanguage: currentLanguage(),
availableLanguages,
defaultLanguage,
onCancel: hide,
onCancel: () => {
hotkeys.stopRecord();
hotkeys.unpause();
hide();
},
onSubmit: ({ hotkeyDefinitions, language }) => {
i18n.changeLanguage(language.value);
hotkeysManager.setHotkeys(hotkeyDefinitions);