diff options
author | Damiano Galassi <[email protected]> | 2019-07-27 13:15:37 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2019-07-27 13:15:37 +0200 |
commit | f82a8597f2800a5ca147679ad5660ef9fab5a85d (patch) | |
tree | 8e859079072c7c5e939ba4a7a7fcac5e8a67c3d9 /macosx/HBQueueTableViewController.m | |
parent | a1d064d2f01d963213b1336c0aeda9e7a1a6817f (diff) |
MacGui: improve queue labels when multiple jobs are selected; fix some bugs.
Diffstat (limited to 'macosx/HBQueueTableViewController.m')
-rw-r--r-- | macosx/HBQueueTableViewController.m | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/macosx/HBQueueTableViewController.m b/macosx/HBQueueTableViewController.m index 9ced3c216..8dc41ec1f 100644 --- a/macosx/HBQueueTableViewController.m +++ b/macosx/HBQueueTableViewController.m @@ -152,7 +152,7 @@ NSIndexSet *targetedRows = [self.tableView targetedRowIndexes]; if (targetedRows.count) { - [self.queue resetItemsStateAtIndexes:targetedRows]; + [self.delegate tableViewResetItemsAtIndexes:targetedRows]; } } @@ -243,7 +243,7 @@ - (void)removeQueueItem:(nonnull HBQueueItem *)item { NSUInteger index = [self.queue.items indexOfObject:item]; - [self.queue removeItemAtIndex:index]; + [self.delegate tableViewRemoveItemsAtIndexes:[NSIndexSet indexSetWithIndex:index]]; } - (void)revealQueueItem:(nonnull HBQueueItem *)item @@ -255,9 +255,8 @@ - (void)tableViewSelectionDidChange:(NSNotification *)notification { - NSInteger selectedRow = self.tableView.selectedRow; - HBQueueItem *selectedItem = selectedRow > -1 ? self.queue.items[selectedRow] : nil; - [self.delegate tableViewDidSelectItem:selectedItem]; + NSIndexSet *indexes = self.tableView.selectedRowIndexes; + [self.delegate tableViewDidSelectItemsAtIndexes:indexes]; } - (void)HB_deleteSelectionFromTableView:(NSTableView *)tableView |