From 19210bebf2a6c358eda157a5bd5f6eaf9a2c1f0d Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Thu, 7 Feb 2008 15:57:32 +0000 Subject: [PATCH] expand groups when changing group values --- macosx/Controller.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 62950009f..7c37f552b 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -2155,10 +2155,16 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi - (void) setGroup: (id) sender { + NSIndexSet * collapsedGroupsIndexes = [fTableView collapsedGroupsIndexes]; + NSEnumerator * enumerator = [[fTableView selectedTorrents] objectEnumerator]; Torrent * torrent; while ((torrent = [enumerator nextObject])) + { + [fTableView removeCollapsedGroup: [torrent groupValue]]; //remove old collapsed group + [torrent setGroupValue: [sender tag]]; + } [self applyFilter: nil]; [self updateUI]; @@ -2514,7 +2520,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi NSPasteboard * pasteboard = [info draggingPasteboard]; if ([[pasteboard types] containsObject: TORRENT_TABLE_VIEW_DATA_TYPE]) { - //remember selected rows if needed + //remember selected rows NSArray * selectedValues = [fTableView selectedValues]; NSIndexSet * indexes = [NSKeyedUnarchiver unarchiveObjectWithData: