Hello,
With FreeCAD compiled from the master branch, when I open a file everything is automatically expanded in the Project tree. See capture below:
Up to 0.13.1830 it didn't do that. Is that intended? I find this really annoying, and it hampers my work flow. When I have many Part Design features, previously they would all show up in the tree, thus could be located quickly. Now I have to scroll down to get to the bottom. And I have a 1920x1200px screen!
Tree automatically expanded upon opening of FCStd file
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Tree automatically expanded upon opening of FCStd file
Mhh,
I'm not aware we changed something there. Was there a switch of Qt on your platform?
Generally I think we should maybe save the status of the tree items with the ViewProviders, so we can preserve the tree state....
I'm not aware we changed something there. Was there a switch of Qt on your platform?
Generally I think we should maybe save the status of the tree items with the ViewProviders, so we can preserve the tree state....
Stop whining - start coding!
Re: Tree automatically expanded upon opening of FCStd file
I am not aware there was a switch. In any case, on the same system I have 0.13.1830 installed from the stable PPA and it doesn't do that.
Re: Tree automatically expanded upon opening of FCStd file
This behaviour has been introduced with the merge of the assembly-dev branch https://sourceforge.net/p/free-cad/code ... e=1#diff-5
When a property of an object changes we explicitly expand the item in the tree view inside the method DocumentItem::slotChangeObject() And since on project load all properties of all objects get touched we have a fully expanded tree view afterwards.
When a property of an object changes we explicitly expand the item in the tree view inside the method DocumentItem::slotChangeObject() And since on project load all properties of all objects get touched we have a fully expanded tree view afterwards.
Re: Tree automatically expanded upon opening of FCStd file
Yes even creating a new file the tree is expanded by default which I find annoying as hell. I mostly use the stable version because of that.
Re: Tree automatically expanded upon opening of FCStd file
I would say we add a Bool property to the ViewProvider base class which define the status of the tree (expanded or not). So one can define on creation if its should be open or not and the status gets saved..
@Werner
You have time to do it?
@Werner
You have time to do it?
Stop whining - start coding!
Re: Tree automatically expanded upon opening of FCStd file
git show a233388
IMO having a PropertyBool to store this information is waste of memory because it needs 4 bytes extra for every object. So, I decided to reserve one bit of our bitset of the DocumentObject where this information can be kept. Then when saving a document an XML attribute "expanded" is written to the ViewProvider tag in the GuiDocument.xml file. This way we don't need any extra memory at all.
IMO having a PropertyBool to store this information is waste of memory because it needs 4 bytes extra for every object. So, I decided to reserve one bit of our bitset of the DocumentObject where this information can be kept. Then when saving a document an XML attribute "expanded" is written to the ViewProvider tag in the GuiDocument.xml file. This way we don't need any extra memory at all.
Re: Tree automatically expanded upon opening of FCStd file
Werner,
Thank you so much!
Thank you so much!