1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-20 21:26:53 +00:00

Reselect proper rows after removing transfers on Snow Leopard

This commit is contained in:
Mitchell Livingston 2012-01-15 07:39:24 +00:00
parent 56a0a90b1e
commit 7228dddbc2
2 changed files with 6 additions and 4 deletions

View file

@ -1335,7 +1335,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
- (void) confirmRemoveTorrents: (NSArray *) torrents deleteData: (BOOL) deleteData
{
NSMutableArray * selectedValues = nil;
if ([NSApp isOnLionOrBetter])
if (![NSApp isOnLionOrBetter])
{
selectedValues = [NSMutableArray arrayWithArray: [fTableView selectedValues]];
[selectedValues removeObjectsInArray: torrents];
@ -1411,11 +1411,11 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
//do here if we're not doing it at the end of the animation
for (Torrent * torrent in torrents)
[torrent closeRemoveTorrent: deleteData];
if (selectedValues)
[fTableView selectValues: selectedValues];
}
if (selectedValues)
[fTableView selectValues: selectedValues];
[self fullUpdateUI];
#warning why do we need them retained?

View file

@ -345,6 +345,8 @@
- (void) outlineViewSelectionIsChanging: (NSNotification *) notification
{
#warning elliminate when view-based?
//if pushing a button, don't change the selected rows
if (fSelectedValues)
[self selectValues: fSelectedValues];
}