Skip to content
Permalink
Browse files

Temporarily remove predicates when save the key mappings

Ref: #2427
  • Loading branch information...
alejx committed May 4, 2019
1 parent e3b73c4 commit d24d8b4d88b97570975230cf422b21355e657d46
Showing with 5 additions and 1 deletion.
  1. +5 −1 iina/PrefKeyBindingViewController.swift
@@ -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)
}

0 comments on commit d24d8b4

Please sign in to comment.
You can’t perform that action at this time.