Revision: 3653
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3653&view=rev
Author:   hofman
Date:     2008-04-06 09:05:18 -0700 (Sun, 06 Apr 2008)

Log Message:
-----------
Don't update enclosed text for circle/box notes when moving when it's empty.

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2008-04-06 15:55:52 UTC (rev 3652)
+++ trunk/SKPDFView.m   2008-04-06 16:05:18 UTC (rev 3653)
@@ -2401,7 +2401,8 @@
         if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisableUpdateContentsFromEnclosedTextKey] == NO &&
             ([[activeAnnotation type] isEqualToString:SKCircleString] || 
[[activeAnnotation type] isEqualToString:SKSquareString])) {
             NSString *selString = [[[[activeAnnotation page] 
selectionForRect:newBounds] string] 
stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines];
-            [activeAnnotation setString:selString];
+            if ([selString length])
+                [activeAnnotation setString:selString];
         }
     }
 }
@@ -2648,7 +2649,8 @@
             if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisableUpdateContentsFromEnclosedTextKey] == NO &&
                 ([[activeAnnotation type] isEqualToString:SKCircleString] || 
[[activeAnnotation type] isEqualToString:SKSquareString])) {
                 NSString *selString = [[[[activeAnnotation page] 
selectionForRect:newBounds] string] 
stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines];
-                [activeAnnotation setString:selString];
+                if ([selString length])
+                    [activeAnnotation setString:selString];
             }
         }
     }
@@ -2851,7 +2853,8 @@
                     [[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisableUpdateContentsFromEnclosedTextKey] == NO &&
                     ([[activeAnnotation type] isEqualToString:SKCircleString] 
|| [[activeAnnotation type] isEqualToString:SKSquareString])) {
                     NSString *selString = [[[[activeAnnotation page] 
selectionForRect:[activeAnnotation bounds]] string] 
stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines];
-                    [activeAnnotation setString:selString];
+                    if ([selString length])
+                        [activeAnnotation setString:selString];
                 }
                 [self setNeedsDisplayForAnnotation:activeAnnotation];
                 mouseDownInAnnotation = NO;


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 the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to