Revision: 3968
http://skim-app.svn.sourceforge.net/skim-app/?rev=3968&view=rev
Author: hofman
Date: 2008-06-04 13:15:39 -0700 (Wed, 04 Jun 2008)
Log Message:
-----------
Remove selection highlights when there's no find result selected
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2008-06-04 18:28:49 UTC (rev 3967)
+++ trunk/SKMainWindowController.m 2008-06-04 20:15:39 UTC (rev 3968)
@@ -2875,9 +2875,6 @@
}
- (void)goToFindResults:(NSArray *)findResults scrollToVisible:(BOOL)scroll {
- if ([findResults count] == 0)
- return;
-
NSEnumerator *selE = [findResults objectEnumerator];
PDFSelection *sel;
@@ -2888,7 +2885,7 @@
while (sel = [selE nextObject])
[currentSel addSelection:sel];
- if (scroll) {
+ if (scroll && firstSel) {
[pdfView setCurrentSelection:currentSel];
[pdfView scrollSelectionToVisible:self];
}
@@ -2902,10 +2899,11 @@
[self addAnnotationsForSelection:sel];
}
- if ([pdfView respondsToSelector:@selector(setCurrentSelection:animate:)])
+ if ([pdfView respondsToSelector:@selector(setCurrentSelection:animate:)]
&& firstSel)
[pdfView setCurrentSelection:firstSel animate:YES];
- [pdfView setCurrentSelection:currentSel];
+ if (currentSel)
+ [pdfView setCurrentSelection:currentSel];
}
- (void)goToFindResults:(NSArray *)findResults {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit