diff --git a/macosx/Controller.mm b/macosx/Controller.mm index a2984aa41..3af24299c 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -4772,6 +4772,11 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool { BOOL warning = NO; + if (self.fFilterBar.isFocused == YES) + { + return NO; + } + for (Torrent* torrent in self.fTableView.selectedTorrents) { if (torrent.active) diff --git a/macosx/FilterBarController.h b/macosx/FilterBarController.h index 623aa0b77..16d3dc1c7 100644 --- a/macosx/FilterBarController.h +++ b/macosx/FilterBarController.h @@ -33,6 +33,7 @@ extern const NSInteger kGroupFilterAllTag; - (IBAction)setGroupFilter:(id)sender; - (void)reset:(BOOL)updateUI; - (void)focusSearchField; +- (BOOL)isFocused; - (void)setCountAll:(NSUInteger)all active:(NSUInteger)active diff --git a/macosx/FilterBarController.mm b/macosx/FilterBarController.mm index 24b42844b..e510706f0 100644 --- a/macosx/FilterBarController.mm +++ b/macosx/FilterBarController.mm @@ -264,6 +264,13 @@ typedef NS_ENUM(NSInteger, FilterTypeTag) { [self.view.window makeFirstResponder:self.fSearchField]; } +- (BOOL)isFocused +{ + NSTextView* textView = (NSTextView*)self.fSearchField.window.firstResponder; + return [self.fSearchField.window.firstResponder isKindOfClass:NSTextView.class] && + [self.fSearchField.window fieldEditor:NO forObject:nil] != nil && [self.fSearchField isEqualTo:textView.delegate]; +} + - (void)searchFieldDidStartSearching:(NSSearchField*)sender { [self.fSearchFieldMinWidthConstraint animator].constant = 95;