Spacebar to Toggle Visibility in PartDesign from 3D View

If you select an item and press space bar it is hidden - so far so good. When you select the bodies or features in the tree view this works as expected.
When selecting objects in the 3D view it selects the last features in nested objects, for example in the PartDesign WB but also SheetMetal WB.
Then, the last feature gets hidden but the body itself appears visible when looking in the tree view.

The expected behavior when I select an object in he tree or in the 3D view is to hide that object.
If I want to toggle a specific feature inside a body (e.g. from the Part Design WB), I can better select this in the tree view and toggle visibility there.


When hiding parts and bodies in the tree and some parts from the 3D view it is unclear when looking at the tree view, which objects are hidden, because collapsed bodies are still shown as visible, because the space bar command only hid the last feature of the selected body in the 3D view.

This is especially painful when dealing with multiple bodies in PartDesign (most of them collapsed in the tree view), Parts and worst case: assemblies!

I have created an issue on GitHub and attached a demo file: https://github.com/FreeCAD/FreeCAD/issues/11132



Quick demo: the first body in the tree is not visible but appears visible. That is because I have selected it in the 3D view and hit space bar, so only the last feature was hidden.
body not visible.png
I propose to hide the entire body if it is selected in the 3D view and has subfeatures from workbenches like PartDesign, SheetMetal,…

What are your opinions about the current behavior and the proposal?

If you want this, set the body’s DisplayMode to Tip. The Current behaviour is very useful when working in a body to hide a feature, but leave sketches visible.
It would be nice though, to have the behaviour you propose as an option, e.g. with a modifier key such as Ctrl+Space.