Revision: 3148
http://skim-app.svn.sourceforge.net/skim-app/?rev=3148&view=rev
Author: hofman
Date: 2007-11-04 11:45:50 -0800 (Sun, 04 Nov 2007)
Log Message:
-----------
Change first responder when swapping in or out edit textfield.
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2007-11-04 18:47:35 UTC (rev 3147)
+++ trunk/SKPDFView.m 2007-11-04 19:45:50 UTC (rev 3148)
@@ -3758,10 +3758,16 @@
if (isVisible) {
NSRect editBounds = [self convertRect:[self
convertRect:[activeAnnotation bounds] fromPage:[activeAnnotation page]]
toView:[self documentView]];
[editField setFrame:editBounds];
- if ([editField superview] == nil)
+ if ([editField superview] == nil) {
[[self documentView] addSubview:editField];
+ if ([[[self window] firstResponder] isEqual:self])
+ [editField selectText:self];
+ }
} else if ([editField superview]) {
+ BOOL wasFirstResponder = [[[self window] firstResponder]
isEqual:[editField currentEditor]];
[editField removeFromSuperview];
+ if (wasFirstResponder)
+ [[self window] makeFirstResponder:self];
}
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit