OS X: correctly make text window the key window.
This is a refactoring bug introduced in 23dc36d
.
pull/4/head
parent
dabd57847e
commit
04a79b4308
|
@ -248,7 +248,6 @@ CONVERT(Rect)
|
||||||
|
|
||||||
[editor setFrameOrigin:origin];
|
[editor setFrameOrigin:origin];
|
||||||
[editor setStringValue:text];
|
[editor setStringValue:text];
|
||||||
[[self window] becomeKeyWindow];
|
|
||||||
[[self window] makeFirstResponder:editor];
|
[[self window] makeFirstResponder:editor];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,6 +397,7 @@ CONVERT(Rect)
|
||||||
.x = xy.x + size.width / 2,
|
.x = xy.x + size.width / 2,
|
||||||
.y = xy.y - size.height / 2
|
.y = xy.y - size.height / 2
|
||||||
};
|
};
|
||||||
|
[[self window] becomeKeyWindow];
|
||||||
[super startEditing:text at:[self convertPointFromBacking:point]
|
[super startEditing:text at:[self convertPointFromBacking:point]
|
||||||
withHeight:fontHeight usingMonospace:FALSE];
|
withHeight:fontHeight usingMonospace:FALSE];
|
||||||
[self prepareEditorWithMinWidthInChars:minWidthChars];
|
[self prepareEditorWithMinWidthInChars:minWidthChars];
|
||||||
|
@ -966,6 +966,7 @@ SolveSpace::DialogChoice SolveSpace::LocateImportedFileYesNoCancel(
|
||||||
- (void)startEditing:(NSString*)text at:(NSPoint)point {
|
- (void)startEditing:(NSString*)text at:(NSPoint)point {
|
||||||
point = [self convertPointFromBacking:point];
|
point = [self convertPointFromBacking:point];
|
||||||
point.y = -point.y + 2;
|
point.y = -point.y + 2;
|
||||||
|
[[self window] makeKeyWindow];
|
||||||
[super startEditing:text at:point withHeight:15.0 usingMonospace:TRUE];
|
[super startEditing:text at:point withHeight:15.0 usingMonospace:TRUE];
|
||||||
[editor setFrameSize:(NSSize){
|
[editor setFrameSize:(NSSize){
|
||||||
.width = [self bounds].size.width - [editor frame].origin.x,
|
.width = [self bounds].size.width - [editor frame].origin.x,
|
||||||
|
|
Loading…
Reference in New Issue