Helping out with the PartDesign Chamfer PR, I have realised of a behaviour of the Property editor that I think it could be improved.
The Chamfer will have several "Modes of operation", where different Modes require different properties. One mode requires just one size, a second mode two sizes (also called radii or distances), third mode one size and one angle (dimension - angle). This is similar to pad, which in one mode has two lengths. This behaviour is controled by a enum combobox which lists the Modes and allows to select one or the other.
With the current FC Code this happens:
i.e. when changing the enum, the property editor must be exited so that the properties are updated.
I was looking for this behaviour:
i.e. the properties auto-update when the enum property is changed.
I have not found a way to do this with the current FC (maybe I missed something).
The reason is that hidden properties are not added to the PropertyModel of the PropertyView. Then it is necessary to rebuild the PropertyModel upon changing the hidden status of a property.
One option to get the desired behaviour is to add all the hidden properties to the PropertyModel and modify the PropertyEditor to actually only show those that are not hidden.
An alternative, to avoid bloating the PropertyView with all the hidden properties, when most are not necessary, I have coded an implementation which uses a new property status bit DynamicallyHideable. Then the PropertyModel is built including DynamicallyHideable properties irrespective of better they are hidden or not, making the PropertyEditor update the visibility of those properties depending on whether they are indeed Hidden or not. This enables the behaviour shown in the second snapshot above.
Would you take a look to this commit and let me know how acceptable it is?wmayer wrote: ping