Revision: 9114
          http://sourceforge.net/p/skim-app/code/9114
Author:   hofman
Date:     2016-09-19 14:37:02 +0000 (Mon, 19 Sep 2016)
Log Message:
-----------
don't do a Find when a Search is busy, as this interferes with the delegate 
methods

Modified Paths:
--------------
    trunk/SKMainWindowController.m

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2016-09-19 08:58:19 UTC (rev 9113)
+++ trunk/SKMainWindowController.m      2016-09-19 14:37:02 UTC (rev 9114)
@@ -1837,16 +1837,20 @@
 }
 
 - (BOOL)findString:(NSString *)string forward:(BOOL)forward {
+    PDFDocument *pdfDoc = [pdfView document];
+    if ([pdfDoc isFinding]) {
+        NSBeep();
+        return NO;
+    }
     PDFSelection *sel = [pdfView currentSelection];
     NSUInteger pageIndex = [[pdfView currentPage] pageIndex];
-    PDFDocument *pdfDoc = [pdfView document];
     NSInteger options = 0;
     if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKCaseInsensitiveFindKey])
         options |= NSCaseInsensitiveSearch;
     if (forward == NO)
         options |= NSBackwardsSearch;
     while ([sel hasCharacters] == NO && (forward ? pageIndex-- > 0 : 
++pageIndex < [pdfDoc pageCount])) {
-        PDFPage *page = [[pdfView document] pageAtIndex:pageIndex];
+        PDFPage *page = [pdfDoc pageAtIndex:pageIndex];
         NSUInteger length = [[page string] length];
         if (length > 0)
             sel = [page selectionForRange:NSMakeRange(0, length)];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to