mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-26 23:36:08 +03:00
Make reset to defaults work again
This commit is contained in:
parent
d63fbda4c4
commit
830a6eafd5
@ -244,10 +244,13 @@ extension ShortcutsPref {
|
||||
alert.beginSheetModal(for: window, completionHandler: { response in
|
||||
guard response == .alertSecondButtonReturn else { return }
|
||||
self.traverseMenuItems { identifier, _ in
|
||||
self.shortcutsDefaultsController.setValue(
|
||||
legacyDefaultShortcuts[identifier],
|
||||
forKeyPath: "values.\(identifier)"
|
||||
)
|
||||
let shortcut = defaultShortcuts[identifier] ?? Shortcut(keyEquivalent: "")
|
||||
let valueToWrite = ValueTransformer
|
||||
.keyedUnarchiveFromDataTransformer
|
||||
.reverseTransformedValue(shortcut)
|
||||
|
||||
self.shortcutsDefaultsController.setValue(valueToWrite, forKeyPath: "values.\(identifier)")
|
||||
self.treeController.rearrangeObjects()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user