fix(keyboardShortcuts) Fix the issue with Reset to Defaults for Keyboard Shortcuts. Fix typo for resetDefaults
This commit is contained in:
parent
e1cd01828a
commit
0c7edbe22e
@ -132,12 +132,12 @@ export class HotkeysManager {
|
|||||||
delete this.defaults[contextName];
|
delete this.defaults[contextName];
|
||||||
}
|
}
|
||||||
|
|
||||||
resetDefauls(contextName) {
|
resetDefaults(contextName) {
|
||||||
const context = this.getContext(contextName);
|
const context = this.getContext(contextName);
|
||||||
const definitions = this.defaults[contextName];
|
const definitions = this.defaults[contextName];
|
||||||
if (!context || !definitions) return;
|
if (!context || !definitions) return;
|
||||||
context.extend(definitions);
|
context.extend(definitions);
|
||||||
return this.store(contextName, definitions).then(this.changeObserver.changed);
|
return this.store(contextName, definitions);
|
||||||
}
|
}
|
||||||
|
|
||||||
switchToContext(contextName) {
|
switchToContext(contextName) {
|
||||||
|
|||||||
@ -29,7 +29,10 @@ Template.hotkeysForm.onCreated(() => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return OHIF.ui.showDialog('dialogConfirm', dialogOptions).then(() => {
|
return OHIF.ui.showDialog('dialogConfirm', dialogOptions).then(() => {
|
||||||
return OHIF.hotkeys.resetDefauls(contextName);
|
const resetDefaults = OHIF.hotkeys.resetDefaults(contextName);
|
||||||
|
resetDefaults.then(() => {
|
||||||
|
OHIF.hotkeys.load(contextName).then(defs => instance.hotkeysDefinitions.set(defs));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user