Collapse all parts in part desing tree view at once

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
nor500
Posts: 5
Joined: Tue Oct 19, 2021 6:10 am

Collapse all parts in part desing tree view at once

Post by nor500 »

Hello,

I have lots of parts in the treeview of my project in part design workbench. Many times they just open itself. However, it is very annoying that I have to collapse those opened parts one-by-one in tree view. Is there any feature that I can collapse all off the parts in tree view with one click?
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Collapse all parts in part desing tree view at once

Post by chrisb »

If things expand automatically, then probably because there is an error inside which must be fixed!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
nor500
Posts: 5
Joined: Tue Oct 19, 2021 6:10 am

Re: Collapse all parts in part desing tree view at once

Post by nor500 »

Thank you. But it would be a nice feature to have one click expand all and close all function.
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Collapse all parts in part desing tree view at once

Post by Syres »

nor500 wrote: Wed Oct 20, 2021 1:20 pm Thank you. But it would be a nice feature to have one click expand all and close all function.
Something like https://wiki.freecadweb.org/Macro_ExpandTreeItem ??
User avatar
bambuko
Veteran
Posts: 2165
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Collapse all parts in part desing tree view at once

Post by bambuko »

It happened to me today as well...
First time and I don't know what I did :evil: (I was re-naming something at the time...)
so I guess it could have been some accidental keyboard command?

So you not the only one it happens to :oops:
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
bambuko
Veteran
Posts: 2165
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Collapse all parts in part desing tree view at once

Post by bambuko »

Syres wrote: Wed Oct 20, 2021 2:37 pm ..something like https://wiki.freecadweb.org/Macro_ExpandTreeItem ??
Thank you, but... isn't there a way of doing it without installing yet another macro? please?
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Collapse all parts in part desing tree view at once

Post by openBrain »

bambuko wrote: Tue Nov 30, 2021 5:25 am Thank you, but... isn't there a way of doing it without installing yet another macro? please?
Here a PR where I implemented my understanding of what you want : https://github.com/FreeCAD/FreeCAD/pull/5218

Precisely, it implements a collapse/expand system based on key presses using Alt modifier + arrow keys

* Alt+Left : collapse selected items (all other items keep their state)
* Alt+Right : expand selected items (all other items keep their state)
* Alt+Up : expand selected items with all tier-1 children collapsed (not go recursively to deeper child levels)
* Alt+Down : expand selected items with all tier-1 children expanded (not go recursively to deeper child levels)
User avatar
bambuko
Veteran
Posts: 2165
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Collapse all parts in part desing tree view at once

Post by bambuko »

openBrain wrote: Thu Dec 02, 2021 4:45 pm ...Here a PR where I implemented my understanding of what you want..
Sounds good to me :)
Thank you!
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Collapse all parts in part desing tree view at once

Post by openBrain »

nor500 wrote: Wed Oct 20, 2021 1:20 pm Thank you. But it would be a nice feature to have one click expand all and close all function.
Merged as commit 26549 by @wmayer.
That's a no-click option as uses key combination.
Post Reply