diff --git a/src/Gui/ViewProviderDatum.cpp b/src/Gui/ViewProviderDatum.cpp index 8195d9c242cd..b9c858399446 100644 --- a/src/Gui/ViewProviderDatum.cpp +++ b/src/Gui/ViewProviderDatum.cpp @@ -107,13 +107,15 @@ void ViewProviderDatum::attach(App::DocumentObject* pcObject) highlight->documentName = getObject()->getDocument()->getName(); highlight->style = SoFCSelection::EMISSIVE_DIFFUSE; + // Visible features + auto visible = new SoSeparator(); // Style for normal (visible) lines auto style = new SoDrawStyle(); style->lineWidth = lineThickness; - highlight->addChild(style); + visible->addChild(style); // Visible lines - highlight->addChild(pRoot); + visible->addChild(pRoot); // Hidden features auto hidden = new SoAnnotation(); @@ -127,9 +129,9 @@ void ViewProviderDatum::attach(App::DocumentObject* pcObject) // Hidden lines hidden->addChild(pRoot); - highlight->addChild(hidden); + visible->addChild(hidden); - sep->addChild(highlight); + sep->addChild(visible); // Scale feature to the given size @@ -140,7 +142,9 @@ void ViewProviderDatum::attach(App::DocumentObject* pcObject) soScale->setPart("shape", sep); soScale->scaleFactor = sz; - addDisplayMaskMode(soScale, "Base"); + highlight->addChild(soScale); + + addDisplayMaskMode(highlight, "Base"); }