diff options
Diffstat (limited to 'Source/SPSplitView.m')
-rw-r--r-- | Source/SPSplitView.m | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/SPSplitView.m b/Source/SPSplitView.m index 2793fd87..4930e171 100644 --- a/Source/SPSplitView.m +++ b/Source/SPSplitView.m @@ -120,7 +120,7 @@ #pragma mark - #pragma mark Delegate management -- (void)setDelegate:(NSObject *)aDelegate +- (void)setDelegate:(id<NSSplitViewDelegate>)aDelegate { delegate = aDelegate; } @@ -699,6 +699,7 @@ [self _ensureDefaultSubviewSizesToIndex:l-1]; delegate = [super delegate]; + [super setDelegate:self]; } @@ -1089,7 +1090,8 @@ } // Check for a first responder to restore, using the "true" first responder for field editors - NSResponder *firstResponderToRestore = [[self window] firstResponder]; + NSResponder<NSTextDelegate> *firstResponderToRestore = [[self window] firstResponder]; + if ([firstResponderToRestore respondsToSelector:@selector(isFieldEditor)] && [(NSText *)firstResponderToRestore isFieldEditor]) { firstResponderToRestore = [(NSText *)firstResponderToRestore delegate]; } |