Revision: 12254
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12254&view=rev
Author:   hofman
Date:     2008-01-04 05:38:08 -0800 (Fri, 04 Jan 2008)

Log Message:
-----------
Make sure selected indexes are consistent with the number of icons.

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

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m        2008-01-04 
11:13:24 UTC (rev 12253)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m        2008-01-04 
13:38:08 UTC (rev 12254)
@@ -633,6 +633,14 @@
     
     if (NSEqualRects(frame, [self frame]) == NO)
         [self setFrame:frame];
+    
+    NSUInteger numIcons = [self numberOfIcons];
+    NSUInteger lastSelIndex = [_selectedIndexes lastIndex];
+    if (lastSelIndex != NSNotFound && lastSelIndex >= numIcons) {
+        NSMutableIndexSet *tmpIndexes = [_selectedIndexes mutableCopy];
+        [tmpIndexes removeIndexesInRange:NSMakeRange(numIcons, lastSelIndex + 
1 - numIcons)];
+        [self setSelectionIndexes:tmpIndexes];
+    }
 }    
 
 - (NSUInteger)_indexForGridRow:(NSUInteger)rowIndex 
column:(NSUInteger)colIndex;


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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to