diff --git a/macosx/FilePriorityCell.m b/macosx/FilePriorityCell.m index eb9e4f809..d55eee516 100644 --- a/macosx/FilePriorityCell.m +++ b/macosx/FilePriorityCell.m @@ -35,7 +35,8 @@ //only for when clicking manually Torrent * torrent = [fItem objectForKey: @"Torrent"]; - if (![torrent canChangeDownloadCheckForFiles: [fItem objectForKey: @"Indexes"]]) + NSIndexSet * indexes = [fItem objectForKey: @"Indexes"]; + if (![torrent canChangeDownloadCheckForFiles: indexes]) return; int priority = segment, actualPriority; @@ -46,7 +47,7 @@ else actualPriority = PRIORITY_NORMAL; - [torrent setFilePriority: actualPriority forIndexes: [fItem objectForKey: @"Indexes"]]; + [torrent setFilePriority: actualPriority forIndexes: indexes]; [fParentView reloadData]; } diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 4dade5fb3..60f1a1efe 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -917,6 +917,10 @@ #warning consider hidden Torrent * torrent = [fTorrents objectAtIndex: 0]; NSIndexSet * indexSet = [item objectForKey: @"Indexes"]; + + if (![torrent canChangeDownloadCheckForFiles: indexSet]) + return NSLocalizedString(@"Priority Not Available", "Inspector -> files tab -> tooltip"); + BOOL low = [torrent hasFilePriority: PRIORITY_LOW forIndexes: indexSet], normal = [torrent hasFilePriority: PRIORITY_NORMAL forIndexes: indexSet], high = [torrent hasFilePriority: PRIORITY_HIGH forIndexes: indexSet];