fix: hotkeys editing in user preferences
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user