Better way to disable search filter.

This commit is contained in:
Mitchell Livingston 2006-07-16 18:28:27 +00:00
parent e03ca2eda0
commit c757564bb7
1 changed files with 2 additions and 4 deletions

View File

@ -1573,17 +1573,15 @@ static void sleepCallBack(void * controller, io_service_t y,
- (void) toggleFilterBar: (id) sender - (void) toggleFilterBar: (id) sender
{ {
if (!fFilterBarVisible)
[fSearchFilterField setEnabled: YES];
[self showFilterBar: !fFilterBarVisible animate: YES]; [self showFilterBar: !fFilterBarVisible animate: YES];
[fDefaults setBool: fFilterBarVisible forKey: @"FilterBar"]; [fDefaults setBool: fFilterBarVisible forKey: @"FilterBar"];
//disable filtering when hiding //disable filtering when hiding
if (!fFilterBarVisible) if (!fFilterBarVisible)
{ {
[fSearchFilterField setEnabled: NO]; [fWindow makeFirstResponder: fTableView];
[fSearchFilterField setStringValue: @""]; [fSearchFilterField setStringValue: @""];
[self setFilter: fNoFilterButton]; [self setFilter: fNoFilterButton];
} }
} }