From: <ho...@us...> - 2006-11-21 21:00:23
|
Revision: 8572 http://svn.sourceforge.net/bibdesk/?rev=8572&view=rev Author: hofman Date: 2006-11-21 13:00:20 -0800 (Tue, 21 Nov 2006) Log Message: ----------- Some improvements updating external groups. Redisplay usually is sufficient, reloading not necessary. Can avoid ending editing group names in some cases (when sorting by group name). Modified Paths: -------------- trunk/bibdesk/BibDocument_Groups.m Modified: trunk/bibdesk/BibDocument_Groups.m =================================================================== --- trunk/bibdesk/BibDocument_Groups.m 2006-11-21 18:57:33 UTC (rev 8571) +++ trunk/bibdesk/BibDocument_Groups.m 2006-11-21 21:00:20 UTC (rev 8572) @@ -156,7 +156,7 @@ if([sortGroupsKey isEqualToString:BDSKGroupCellCountKey]){ [self sortGroupsByKey:sortGroupsKey]; }else{ - [groupTableView reloadData]; + [groupTableView setNeedsDisplay:YES]; if ([[self selectedGroups] containsObject:group] && succeeded == YES) [self displaySelectedGroups]; } @@ -197,7 +197,7 @@ if([sortGroupsKey isEqualToString:BDSKGroupCellCountKey]){ [self sortGroupsByKey:sortGroupsKey]; }else{ - [groupTableView reloadData]; + [groupTableView setNeedsDisplay:YES]; if ([[self selectedGroups] containsObject:group] && succeeded == YES) [self displaySelectedGroups]; } @@ -213,7 +213,7 @@ if([sortGroupsKey isEqualToString:BDSKGroupCellCountKey]){ [self sortGroupsByKey:sortGroupsKey]; }else{ - [groupTableView reloadData]; + [groupTableView setNeedsDisplay:YES]; if ([[self selectedGroups] containsObject:group] && succeeded == YES) [self displaySelectedGroups]; } @@ -766,7 +766,9 @@ - (void)URLGroupSheetDidEnd:(BDSKURLGroupSheetController *)sheetController returnCode:(int) returnCode contextInfo:(void *)contextInfo{ if(returnCode == NSOKButton){ unsigned int insertIndex = NSMaxRange([groups rangeOfURLGroups]); - [groups addURLGroup:[sheetController group]]; + BDSKURLGroup *group = [sheetController group]; + [groups addURLGroup:group]; + [group publications]; [groupTableView reloadData]; [groupTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:insertIndex] byExtendingSelection:NO]; @@ -788,7 +790,9 @@ - (void)scriptGroupSheetDidEnd:(BDSKScriptGroupSheetController *)sheetController returnCode:(int) returnCode contextInfo:(void *)contextInfo{ if(returnCode == NSOKButton){ unsigned int insertIndex = NSMaxRange([groups rangeOfScriptGroups]); - [groups addScriptGroup:[sheetController group]]; + BDSKScriptGroup *group = [sheetController group]; + [groups addScriptGroup:group]; + [group publications]; [groupTableView reloadData]; [groupTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:insertIndex] byExtendingSelection:NO]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |