Revision: 7673
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7673&view=rev
Author:   hofman
Date:     2012-02-28 18:19:42 +0000 (Tue, 28 Feb 2012)
Log Message:
-----------
make sure note redrawing is done properly when reducing line width of ink note

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2012-02-28 13:07:40 UTC (rev 7672)
+++ trunk/SKMainWindowController.m      2012-02-28 18:19:42 UTC (rev 7673)
@@ -2249,8 +2249,13 @@
             if ([keyPath isEqualToString:SKNPDFAnnotationModificationDateKey] 
== NO && [keyPath isEqualToString:SKNPDFAnnotationUserNameKey] == NO) {
                 PDFPage *page = [note page];
                 NSRect oldRect = NSZeroRect;
-                if ([keyPath isEqualToString:SKNPDFAnnotationBoundsKey] && 
[oldValue isEqual:[NSNull null]] == NO)
+                if ([keyPath isEqualToString:SKNPDFAnnotationBoundsKey] && 
[oldValue isEqual:[NSNull null]] == NO) {
                     oldRect = [note displayRectForBounds:[oldValue rectValue]];
+                } else if ([[note type] isEqualToString:SKNInkString] && 
[keyPath isEqualToString:SKNPDFAnnotationBorderKey] && [oldValue 
isEqual:[NSNull null]] == NO) {
+                    CGFloat dw = [oldValue lineWidth] - ([oldValue 
isEqual:[NSNull null]] ? 0.0 : [newValue lineWidth]);
+                    if (dw > 0.0)
+                        oldRect = NSInsetRect([note displayRectForBounds:[note 
bounds]], -dw, -dw);
+                }
                 
                 [self updateThumbnailAtPageIndex:[note pageIndex]];
                 

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


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to