diff --git a/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp b/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp index 4ea41bb4a0..bc00eb8aa4 100644 --- a/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp @@ -43,13 +43,13 @@ ViewProviderConstraintInternal::ViewProviderConstraintInternal() { //constraint entiti color ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); - unsigned long scol = hGrp->GetUnsigned("ConstructionColor", 421075455UL); // dark grey (25,25,25) + unsigned long scol = hGrp->GetUnsigned("ConstructionColor", 56319UL); float r, g, b; r = ((scol >> 24) & 0xff) / 255.0; g = ((scol >> 16) & 0xff) / 255.0; b = ((scol >> 8) & 0xff) / 255.0; - long unsigned ccol = hGrp->GetUnsigned("FullyConstrainedColor", 421075455UL); + long unsigned ccol = hGrp->GetUnsigned("FullyConstrainedColor", 16711935UL); float r2, g2, b2; r2 = ((ccol >> 24) & 0xff) / 255.0; g2 = ((ccol >> 16) & 0xff) / 255.0; @@ -112,13 +112,13 @@ ViewProviderConstraint::ViewProviderConstraint() : m_selected(false) //constraint entiti color ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); - unsigned long scol = hGrp->GetUnsigned("ConstructionColor", 421075455UL); // dark grey (25,25,25) + unsigned long scol = hGrp->GetUnsigned("ConstructionColor", 56319UL); float r, g, b; r = ((scol >> 24) & 0xff) / 255.0; g = ((scol >> 16) & 0xff) / 255.0; b = ((scol >> 8) & 0xff) / 255.0; - long unsigned ccol = hGrp->GetUnsigned("FullyConstrainedColor", 421075455UL); + long unsigned ccol = hGrp->GetUnsigned("FullyConstrainedColor", 16711935UL); float r2, g2, b2; r2 = ((ccol >> 24) & 0xff) / 255.0; g2 = ((ccol >> 16) & 0xff) / 255.0; @@ -367,3 +367,8 @@ TopoDS_Shape ViewProviderConstraint::getConstraintShape(int link) return s2; }; } + +void ViewProviderConstraint::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) +{ + ViewProviderDocumentObject::setupContextMenu(menu, receiver, member); +} diff --git a/src/Mod/Assembly/Gui/ViewProviderConstraint.h b/src/Mod/Assembly/Gui/ViewProviderConstraint.h index 9371a3f1c1..2e963bd652 100644 --- a/src/Mod/Assembly/Gui/ViewProviderConstraint.h +++ b/src/Mod/Assembly/Gui/ViewProviderConstraint.h @@ -83,6 +83,9 @@ public: //needs to be overridden as we use the modeselection node for on and off and not for //hide and show in the normal way virtual bool isShow(void) const; + + //avoid unneeded context menu entrys + virtual void setupContextMenu(QMenu* menu, QObject* receiver, const char* member); private: //we need two seperate visual representations, as both constraint parts have different