Skip to content

Commit

Permalink
Temporarily remove predicates when save the key mappings
Browse files Browse the repository at this point in the history
Ref: #2427
  • Loading branch information
uiryuu committed May 4, 2019
1 parent e3b73c4 commit d24d8b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion iina/PrefKeyBindingViewController.swift
Expand Up @@ -322,9 +322,13 @@ class PrefKeyBindingViewController: NSViewController, PreferenceWindowEmbeddable
}

func saveToConfFile(_ sender: Notification) {
let predicate = mappingController.filterPredicate
mappingController.filterPredicate = nil
let keyMapping = mappingController.arrangedObjects as! [KeyMapping]
setKeybindingsForPlayerCore()
mappingController.filterPredicate = predicate
do {
try KeyMapping.generateConfData(from: mappingController.arrangedObjects as! [KeyMapping]).write(toFile: currentConfFilePath, atomically: true, encoding: .utf8)
try KeyMapping.generateConfData(from: keyMapping).write(toFile: currentConfFilePath, atomically: true, encoding: .utf8)
} catch {
Utility.showAlert("config.cannot_write", sheetWindow: view.window)
}
Expand Down

0 comments on commit d24d8b4

Please sign in to comment.