From 26ac41f93dccb70141619fdc5f65405ad8e7567c Mon Sep 17 00:00:00 2001 From: carlopav Date: Mon, 22 Jun 2020 22:05:27 +0200 Subject: [PATCH] Gui: attempt to reorder ViewProviderDocumentObject properties ref: https://forum.freecadweb.org/viewtopic.php?f=8&t=46911#p403077 @wmayer beware, I didn't test compiling. Gui: fixed duplicated property adding in ViewProviderDocumentObject fixed regression --- src/Gui/ViewProviderDocumentObject.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Gui/ViewProviderDocumentObject.cpp b/src/Gui/ViewProviderDocumentObject.cpp index 65f8b1acde..c0ddbb4790 100644 --- a/src/Gui/ViewProviderDocumentObject.cpp +++ b/src/Gui/ViewProviderDocumentObject.cpp @@ -73,17 +73,19 @@ ViewProviderDocumentObject::ViewProviderDocumentObject() , pcDocument(nullptr) , _UpdatingView(false) { - ADD_PROPERTY(DisplayMode,((long)0)); - ADD_PROPERTY(Visibility,(true)); - ADD_PROPERTY(ShowInTree,(true)); - - ADD_PROPERTY(SelectionStyle,((long)0)); + static const char *dmgroup = "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(SelectionStyle, ((long)0), sgroup, App::Prop_None, "Set the object selection style"); static const char *SelectionStyleEnum[] = {"Shape","BoundBox",0}; SelectionStyle.setEnums(SelectionStyleEnum); static const char* OnTopEnum[]= {"Disabled","Enabled","Object","Element",NULL}; - ADD_PROPERTY(OnTopWhenSelected,((long int)0)); - ADD_PROPERTY_TYPE(OnTopWhenSelected,((long int)0), "Base", App::Prop_None, + ADD_PROPERTY_TYPE(OnTopWhenSelected,((long int)0), sgroup, App::Prop_None, "Enabled: Display the object on top of any other object when selected\n" "Object: On top only if the whole object is selected\n" "Element: On top only if some sub-element of the object is selected");