make sure filter buttons' tooltips are updated when the bar is shown

This commit is contained in:
Mitchell Livingston 2011-02-20 04:23:09 +00:00
parent 8425f84d74
commit 7ba8bcb2b6
1 changed files with 4 additions and 2 deletions

View File

@ -2064,7 +2064,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
}
//set button tooltips
[fFilterBar setCountAll: [fTorrents count] active: active downloading: downloading seeding: seeding paused: paused];
if (fFilterBar)
[fFilterBar setCountAll: [fTorrents count] active: active downloading: downloading seeding: seeding paused: paused];
//clear display cache for not-shown torrents
[previousTorrents removeObjectsInArray: allTorrents];
@ -2899,8 +2900,9 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
{
[[NSUserDefaults standardUserDefaults] setObject: FILTER_NONE forKey: @"Filter"];
[[NSUserDefaults standardUserDefaults] setInteger: GROUP_FILTER_ALL_TAG forKey: @"FilterGroup"];
[self applyFilter];
}
[self applyFilter]; //do even if showing to ensure tooltips are updated
}
//doesn't save shown state