From 3aff3c3eb83b8e886665e5b38adcb95e8e0fe875 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 10 Dec 2024 16:27:42 +0100 Subject: [PATCH] Core: Fix pre-selection of coordinate system --- src/Gui/ViewProviderDatum.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Gui/ViewProviderDatum.cpp b/src/Gui/ViewProviderDatum.cpp index 93736271b1..1e30a3ea66 100644 --- a/src/Gui/ViewProviderDatum.cpp +++ b/src/Gui/ViewProviderDatum.cpp @@ -106,13 +106,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(); @@ -126,9 +128,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 @@ -139,7 +141,9 @@ void ViewProviderDatum::attach(App::DocumentObject* pcObject) soScale->setPart("shape", sep); soScale->scaleFactor = sz; - addDisplayMaskMode(soScale, "Base"); + highlight->addChild(soScale); + + addDisplayMaskMode(highlight, "Base"); }