Revision: 28676
          http://sourceforge.net/p/bibdesk/svn/28676
Author:   hofman
Date:     2024-01-25 17:22:33 +0000 (Thu, 25 Jan 2024)
Log Message:
-----------
don't save gstate for every selection highlight

Modified Paths:
--------------
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2024-01-25 
17:01:49 UTC (rev 28675)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2024-01-25 
17:22:33 UTC (rev 28676)
@@ -2156,14 +2156,10 @@
             [p setLineWidth:1.0];
         }
         
-        
         [NSGraphicsContext restoreGraphicsState];
     }
-    // make sure we use source over for drawing the image
-    CGContextSaveGState(drawingContext);
-    CGContextSetBlendMode(drawingContext, kCGBlendModeNormal);
+    
     CGContextDrawLayerInRect(drawingContext, NSRectToCGRect(aRect), 
_selectionOverlay);
-    CGContextRestoreGState(drawingContext);
 }
 
 #define DROP_MESSAGE_MIN_FONTSIZE ((CGFloat) 8.0)
@@ -2581,6 +2577,9 @@
     if ([_selectionIndexes count] > 0) {
         CGContextRef context = [[NSGraphicsContext currentContext] 
graphicsPort];
         
+        CGContextSaveGState(context);
+        CGContextSetBlendMode(context, kCGBlendModeNormal);
+        
         [_selectionIndexes enumerateIndexesUsingBlock:^(NSUInteger i, BOOL 
*stop){
             NSUInteger r, c;
             if ([self _getGridRow:&r column:&c ofIndex:i]) {
@@ -2589,6 +2588,8 @@
                     [self _drawHighlightInRect:highlightRect 
inContext:context];
             }
         }];
+        
+        CGContextRestoreGState(context);
     }
     
 #if DEBUG_GRID

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



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to