From 7a84e52fa14fee4c72bc8c1ed0a8ecfac925fc8d Mon Sep 17 00:00:00 2001 From: carlopav Date: Mon, 22 Jun 2020 22:24:40 +0200 Subject: [PATCH] Gui: divide ViewProviderGeometryObject properties into groups . . . . --- src/Gui/ViewProviderDocumentObject.cpp | 8 ++++---- src/Gui/ViewProviderGeometryObject.cpp | 14 +++++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Gui/ViewProviderDocumentObject.cpp b/src/Gui/ViewProviderDocumentObject.cpp index c0ddbb4790..bcdde0e893 100644 --- a/src/Gui/ViewProviderDocumentObject.cpp +++ b/src/Gui/ViewProviderDocumentObject.cpp @@ -73,12 +73,12 @@ ViewProviderDocumentObject::ViewProviderDocumentObject() , pcDocument(nullptr) , _UpdatingView(false) { - static const char *dmgroup = "Display Options"; + static const char *dogroup = "Display Options"; static const char *sgroup = "Selection"; - ADD_PROPERTY_TYPE(DisplayMode, ((long)0), dmgroup, App::Prop_None, "Set the display mode"); - ADD_PROPERTY_TYPE(Visibility, (true), dmgroup, App::Prop_None, "Show the object in the 3d view"); - ADD_PROPERTY_TYPE(ShowInTree, (true), dmgroup, App::Prop_None, "Show the object in the tree view"); + ADD_PROPERTY_TYPE(DisplayMode, ((long)0), dogroup, App::Prop_None, "Set the display mode"); + ADD_PROPERTY_TYPE(Visibility, (true), dogroup, App::Prop_None, "Show the object in the 3d view"); + ADD_PROPERTY_TYPE(ShowInTree, (true), dogroup, App::Prop_None, "Show the object in the tree view"); ADD_PROPERTY_TYPE(SelectionStyle, ((long)0), sgroup, App::Prop_None, "Set the object selection style"); static const char *SelectionStyleEnum[] = {"Shape","BoundBox",0}; diff --git a/src/Gui/ViewProviderGeometryObject.cpp b/src/Gui/ViewProviderGeometryObject.cpp index d0129fb229..bf315e0cf0 100644 --- a/src/Gui/ViewProviderGeometryObject.cpp +++ b/src/Gui/ViewProviderGeometryObject.cpp @@ -95,13 +95,17 @@ ViewProviderGeometryObject::ViewProviderGeometryObject() b = ((shcol >> 8) & 0xff) / 255.0; } - ADD_PROPERTY(ShapeColor,(r, g, b)); - ADD_PROPERTY(Transparency,(0)); + static const char *dogroup = "Display Options"; + static const char *sgroup = "Selection"; + static const char *osgroup = "Object Style"; + + ADD_PROPERTY_TYPE(ShapeColor, (r, g, b), osgroup, App::Prop_None, "Set shape color"); + ADD_PROPERTY_TYPE(Transparency, (0), osgroup, App::Prop_None, "Set object transparency"); Transparency.setConstraints(&intPercent); App::Material mat(App::Material::DEFAULT); - ADD_PROPERTY(ShapeMaterial,(mat)); - ADD_PROPERTY(BoundingBox,(false)); - ADD_PROPERTY(Selectable,(true)); + ADD_PROPERTY_TYPE(ShapeMaterial,(mat), osgroup, App::Prop_None, "Shape material"); + ADD_PROPERTY_TYPE(BoundingBox, (false), dogroup, App::Prop_None, "Display object bounding box"); + ADD_PROPERTY_TYPE(Selectable, (true), sgroup, App::Prop_None, "Set if the object is selectable in the 3d view"); bool enableSel = hGrp->GetBool("EnableSelection", true); Selectable.setValue(enableSel);