Fix a bug and remove some unneeded vars.
This commit is contained in:
2 files changed
+3
-5
No files matched your search
@@ -12,8 +12,6 @@ class OptionsViewController: NSViewController, NSMenuItemValidation {
|
|||||||
|
|
||||||
@IBOutlet var destButton: NSPopUpButton!
|
@IBOutlet var destButton: NSPopUpButton!
|
||||||
|
|
||||||
private static var observerContext = 0
|
|
||||||
|
|
||||||
@objc private dynamic let options: QueuePreferences
|
@objc private dynamic let options: QueuePreferences
|
||||||
|
|
||||||
@objc private dynamic var sets: [MetadataPreset]
|
@objc private dynamic var sets: [MetadataPreset]
|
||||||
|
|||||||
@@ -178,9 +178,11 @@ class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDelegate,
|
|||||||
do {
|
do {
|
||||||
try item.prepare()
|
try item.prepare()
|
||||||
} catch {
|
} catch {
|
||||||
|
DispatchQueue.main.async {
|
||||||
self.presentError(error)
|
self.presentError(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
do {
|
do {
|
||||||
@@ -747,9 +749,7 @@ class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDelegate,
|
|||||||
func tableView(_ tableView: NSTableView, acceptDrop info: NSDraggingInfo, row: Int, dropOperation: NSTableView.DropOperation) -> Bool {
|
func tableView(_ tableView: NSTableView, acceptDrop info: NSDraggingInfo, row: Int, dropOperation: NSTableView.DropOperation) -> Bool {
|
||||||
let pboard = info.draggingPasteboard
|
let pboard = info.draggingPasteboard
|
||||||
|
|
||||||
if let source = info.draggingSource as? NSTableView, source == tableView,
|
if let source = info.draggingSource as? NSTableView, source == tableView, let rowData = pboard.data(forType: tablePasteboardType), let rowIndexes = NSKeyedUnarchiver.unarchiveObject(with: rowData) as? IndexSet {
|
||||||
let rowData = pboard.data(forType: tablePasteboardType),
|
|
||||||
let rowIndexes = NSKeyedUnarchiver.unarchiveObject(with: rowData) as? IndexSet {
|
|
||||||
|
|
||||||
let items = queue.items(at: rowIndexes)
|
let items = queue.items(at: rowIndexes)
|
||||||
move(items: items, at: row)
|
move(items: items, at: row)
|
||||||
|
|||||||
Reference in new issue
Block a user