From: <ho...@us...> - 2006-08-31 07:31:34
|
Revision: 7611 http://svn.sourceforge.net/bibdesk/?rev=7611&view=rev Author: hofman Date: 2006-08-31 00:31:29 -0700 (Thu, 31 Aug 2006) Log Message: ----------- Select last batch of errors when editing a failed paste/drag. Modified Paths: -------------- trunk/bibdesk/BDSKErrorObjectController.m Modified: trunk/bibdesk/BDSKErrorObjectController.m =================================================================== --- trunk/bibdesk/BDSKErrorObjectController.m 2006-08-30 22:11:36 UTC (rev 7610) +++ trunk/bibdesk/BDSKErrorObjectController.m 2006-08-31 07:31:29 UTC (rev 7611) @@ -77,6 +77,7 @@ } else { errors = [[NSMutableArray alloc] initWithCapacity:10]; managers = [[NSMutableArray alloc] initWithCapacity:4]; + lastIndex = 0; [managers addObject:[BDSKErrorManager allItemsErrorManager]]; @@ -243,10 +244,14 @@ // edit paste/drag error - (void)showEditorForLastPasteDragError{ - BDSKErrorObject *errObj = [errors lastObject]; - OBASSERT([[errObj editor] isPasteDrag]); - [self showErrorPanel:self]; - [self showEditorForErrorObject:errObj]; + if(lastIndex < [self countOfErrors]){ + BDSKErrorObject *errObj = [self objectInErrorsAtIndex:lastIndex]; + OBASSERT([[errObj editor] isPasteDrag]); + [self showErrorPanel:self]; + [self showEditorForErrorObject:errObj]; + NSIndexSet *indexes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(lastIndex, [self countOfErrors] - lastIndex)]; + [errorTableView selectRowIndexes:indexes byExtendingSelection:NO]; + }else NSBeep(); } #pragma mark Managing managers, editors and errors @@ -406,6 +411,7 @@ OBASSERT([currentErrors count] == 0); [currentErrors removeAllObjects]; } + lastIndex = [self countOfErrors]; } - (void)endObservingErrorsForDocument:(BibDocument *)document pasteDragData:(NSData *)data publication:(BibItem *)pub{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |