The context menue set color does not work for all Part objects. It does not work either for Boolean Fragments nor for CompoundFilter.
- Start FreeCAD
- make a cube and a cylinder
- make a boolean union of them
- select the union --> Part --> compound --> CompoundFilter
- select the CompoundFilter --> right click --> set color --> nothing happens
OS: Debian GNU/Linux 8.7 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10283 (Git)
Build type: Unknown
Branch: master
Hash: dd7b65a585fe0fe2a8ceb37be55e1f721de24190
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.0.0
Part Workbench, set color
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Part Workbench, set color
Looks like setEdit is not implemented to handle edit modes of sub-classes: https://github.com/FreeCAD/FreeCAD/blob ... er.py#L185- select the union --> Part --> compound --> CompoundFilter
- select the CompoundFilter --> right click --> set color --> nothing happens
For me it's not clear why _ViewProviderCompoundFilter suppresses all kind of edit modes. On the other hand the class doesn't know just from the "mode" number what the mode is supposed to do.
It's best to ask DeepSOIC what's the purpose of setEdit doing it this way.
Re: Part Workbench, set color
Thanks for the informations werner. If I comment the setEdit and unsetEdit it works flawlessly ...
If so I would go for a PR which deletes the setEdit and unsetEdit, but before I get in contact with DeepSOIC.
I copied it from DeepSoics code. May be he did it for the same reason than I did not change it. He did not know the insides ... In FEM I need setEdit and unsetEdit for my objects to open the taskpanel, means I have them over there in all objects. I did not know they are not mandatory. Does it mean I only would need setEdit and unsetEdit if I need to overwrite the standard behavior (same like double clicked) ?wmayer wrote:For me it's not clear why _ViewProviderCompoundFilter suppresses all kind of edit modes.
If so I would go for a PR which deletes the setEdit and unsetEdit, but before I get in contact with DeepSOIC.
How about the modes? Where do I get more informations about them. I never really understood what are they used for in setEdit and unsetEditwmayer wrote: On the other hand the class doesn't know just from the "mode" number what the mode is supposed to do.
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Part Workbench, set color
At some point, I read the code to see what return value of setEdit() does. To find out that if I return False, Part::Feature's setEdit is invoked. This has changed recently.wmayer wrote:It's best to ask DeepSOIC what's the purpose of setEdit doing it this way.
There was no specific purpose in doing it
PS: thanks bernd for pm, otherwise I would likely have missed this topic.
Re: Part Workbench, set color
@DeepSOIC:
How about removing all setEdit and unsetEdit to get the C++ setEdit modes working again ? https://github.com/berndhahnebach/FreeC ... 83c9efd457
bernd
How about removing all setEdit and unsetEdit to get the C++ setEdit modes working again ? https://github.com/berndhahnebach/FreeC ... 83c9efd457
bernd
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Part Workbench, set color
Yes of course, delete them. I thought it was done already.