mirror of
https://github.com/transmission/transmission
synced 2025-03-04 02:28:03 +00:00
expand a torrent's group when removing it, since either the whole group is being removed or it is already expanded
This commit is contained in:
parent
015f40e498
commit
346060659d
3 changed files with 13 additions and 0 deletions
|
@ -1167,6 +1167,9 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
enumerator = [torrents objectEnumerator];
|
||||
while ((torrent = [enumerator nextObject]))
|
||||
{
|
||||
//expand the group, since either the whole group is being removed or it is already expanded
|
||||
[fTableView removeCollapsedGroup: [torrent groupValue]];
|
||||
|
||||
if (deleteData)
|
||||
[torrent trashData];
|
||||
if (deleteTorrent)
|
||||
|
@ -1938,6 +1941,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
[fTableView selectValues: selectedValues];
|
||||
|
||||
//reset expanded/collapsed rows
|
||||
#warning redo to not require storing an indexset?
|
||||
if (groupRows && [fDisplayedTorrents count] > 0 && [NSApp isOnLeopardOrBetter])
|
||||
{
|
||||
NSIndexSet * collapsed = [fTableView collapsedGroupsIndexes];
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
}
|
||||
|
||||
- (NSIndexSet *) collapsedGroupsIndexes;
|
||||
- (void) removeCollapsedGroup: (int) value;
|
||||
|
||||
- (void) removeButtonTrackingAreas;
|
||||
- (void) setControlButtonHover: (int) row;
|
||||
|
|
|
@ -95,6 +95,14 @@
|
|||
return fCollapsedGroups;
|
||||
}
|
||||
|
||||
- (void) removeCollapsedGroup: (int) value
|
||||
{
|
||||
if (value < 0)
|
||||
value = INT_MAX;
|
||||
|
||||
[fCollapsedGroups removeIndex: value];
|
||||
}
|
||||
|
||||
- (BOOL) outlineView: (NSOutlineView *) outlineView isGroupItem: (id) item
|
||||
{
|
||||
return ![item isKindOfClass: [Torrent class]];
|
||||
|
|
Loading…
Add table
Reference in a new issue