mirror of
https://github.com/transmission/transmission.git
synced 2025-12-26 13:21:44 +00:00
Fix deleting previously selected torrent when trying to clear search field using Command + Delete (#4245)
* Fix deleting previously selected torrent when trying to clear search field using Command + Delete Fixes #3599 * Fixes after code review * Fixes after code review * chore: make clang-format happy Co-authored-by: Daniil Subbotin <d.subbotin@opends.tech>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user