Suggestion: Collapse All


#1

Hi Jules,

With large scale projects, having to collapse a series of folders/filters/groups manually in the Introjucer can become tedious, and so would like to suggest adding a means of collapsing groups in the Introjucer.

Something in the vein of being able to collapse a specific group (and all of its subgroups), all the selected groups (and their subgroups), and all groups from the project icon (and their subgroups).

[attachment=0]Something Like This.png[/attachment]


#2

Yep, that’s a handy idea, and easy to implement - my favourite kind of suggestion!


#3

Thanks Jules - just noticed this addition!

Sadly, collapsing groups only does so for the groups at the same level as where the function occurred. Would you mind extending this functionality to collapse a group, and all of its subgroups (and theirs, and so on…).


#4

Um… It definitely does collapse the groups recursively… I wrote a recursive function to do it: search for openOrCloseAllSubGroups(). If that doesn’t do what you want, then please suggest why/how to change it!


#5

Hm… I checked the logs; that static function is definitely recursive! There’s something amiss - I’ll look into it.


#6

I see something bizarre happening related to restoreOpennessState(), when a group has been opened again with the arrow (that is - after groups have been collapsed): it seems the item’s subgroups get opened, even if they were all closed down - even though I only told the one group to open!

So, the new collapse/expand all feature is working… just can’t quite tell without looking at the code!


#7

Well, I think the tree is set to be open-by-default.


#8

The collapsing is still not perfect… As I stated before, the recursive function is working fine - so something else is up. I’m not able to locate the source of the issue, but here is an Introjucer project with steps to demonstrate:

[attachment=0]GroupCollapsingTest.zip[/attachment]
Steps (assuming you’ve the project, and you’re looking at the tree-view already):
[list]
[]Collapse-all subgroups from the main project node[/]
[]Click arrow from the main node to show children[/]
[]Click arrow on Group A to show its children[/]
[]Notice that Group B and Group C are opened![/][/list]


#9

Yeah, I don’t think that once a node is closed, then it might forget the openness of anything inside it.