From: Mitchell Livingston Date: Tue, 3 Jun 2008 16:28:09 +0000 (+0000) Subject: only update the options window when the updated torrent is already selected X-Git-Tag: 1.22~165 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c42a623ada00b99f5512c35ac858fdd43d95d93f;p=transmission only update the options window when the updated torrent is already selected --- diff --git a/macosx/Controller.m b/macosx/Controller.m index eaa7d9cd5..fd63bbc41 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -1682,9 +1682,11 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy [self updateTorrentsInQueue]; - #warning perhaps check if torrent is selected in inspector - [fInfoController updateInfoStats]; - [fInfoController updateOptions]; + if ([[fTableView selectedTorrents] containsObject: torrent]) + { + [fInfoController updateInfoStats]; + [fInfoController updateOptions]; + } if (!fSoundPlaying && [fDefaults boolForKey: @"PlaySeedingSound"]) { @@ -4243,11 +4245,14 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy - (void) rpcChangedTorrent: (Torrent *) torrent { [torrent update]; - [torrent release]; - #warning check if torrent is selected? - [fInfoController updateInfoStats]; - [fInfoController updateOptions]; + if ([[fTableView selectedTorrents] containsObject: torrent]) + { + [fInfoController updateInfoStats]; + [fInfoController updateOptions]; + } + + [torrent release]; } @end