OS X: correctly make text window the key window.

This is a refactoring bug introduced in 23dc36d.
pull/4/head
whitequark 2016-04-21 20:23:33 +04:00
parent dabd57847e
commit 04a79b4308
1 changed files with 2 additions and 1 deletions

View File

@ -248,7 +248,6 @@ CONVERT(Rect)
[editor setFrameOrigin:origin];
[editor setStringValue:text];
[[self window] becomeKeyWindow];
[[self window] makeFirstResponder:editor];
}
@ -398,6 +397,7 @@ CONVERT(Rect)
.x = xy.x + size.width / 2,
.y = xy.y - size.height / 2
};
[[self window] becomeKeyWindow];
[super startEditing:text at:[self convertPointFromBacking:point]
withHeight:fontHeight usingMonospace:FALSE];
[self prepareEditorWithMinWidthInChars:minWidthChars];
@ -966,6 +966,7 @@ SolveSpace::DialogChoice SolveSpace::LocateImportedFileYesNoCancel(
- (void)startEditing:(NSString*)text at:(NSPoint)point {
point = [self convertPointFromBacking:point];
point.y = -point.y + 2;
[[self window] makeKeyWindow];
[super startEditing:text at:point withHeight:15.0 usingMonospace:TRUE];
[editor setFrameSize:(NSSize){
.width = [self bounds].size.width - [editor frame].origin.x,