mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-28 08:13:17 +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
|
alert.beginSheetModal(for: window, completionHandler: { response in
|
||||||
guard response == .alertSecondButtonReturn else { return }
|
guard response == .alertSecondButtonReturn else { return }
|
||||||
self.traverseMenuItems { identifier, _ in
|
self.traverseMenuItems { identifier, _ in
|
||||||
self.shortcutsDefaultsController.setValue(
|
let shortcut = defaultShortcuts[identifier] ?? Shortcut(keyEquivalent: "")
|
||||||
legacyDefaultShortcuts[identifier],
|
let valueToWrite = ValueTransformer
|
||||||
forKeyPath: "values.\(identifier)"
|
.keyedUnarchiveFromDataTransformer
|
||||||
)
|
.reverseTransformedValue(shortcut)
|
||||||
|
|
||||||
|
self.shortcutsDefaultsController.setValue(valueToWrite, forKeyPath: "values.\(identifier)")
|
||||||
|
self.treeController.rearrangeObjects()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user