Revision: 11897
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=11897&view=rev
Author:   hofman
Date:     2007-12-13 01:44:14 -0800 (Thu, 13 Dec 2007)

Log Message:
-----------
Set the file index in consolidate action.

Modified Paths:
--------------
    trunk/bibdesk/BDSKEditor.m

Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m  2007-12-13 06:49:34 UTC (rev 11896)
+++ trunk/bibdesk/BDSKEditor.m  2007-12-13 09:44:14 UTC (rev 11897)
@@ -1007,14 +1007,13 @@
 - (IBAction)consolidateLinkedFiles:(id)sender{
        [self finalizeChangesPreservingSelection:YES];
        
-    // @@ not clear what's going on here
-#warning this is always NSNotFound
+    NSNumber *indexNumber = [sender representedObject];
     unsigned int anIndex = NSNotFound;
        BOOL canSet = YES;
     
-    if ([sender representedObject]) {
-        BDSKLinkedFile *file = [publication objectInFilesAtIndex:[[sender 
representedObject] unsignedIntValue]];
-        canSet = [publication canSetURLForLinkedFile:file];
+    if (indexNumber) {
+        anIndex = [indexNumber unsignedIntValue];
+        canSet = [publication canSetURLForLinkedFile:[publication 
objectInFilesAtIndex:anIndex]];
     } else {
         NSEnumerator *fileEnum = [[publication localFiles] objectEnumerator];
         BDSKLinkedFile *file;


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

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to