MeasureGui: Add globalSeparator to VPMeasureBase

This allows annotations in global space
This commit is contained in:
hlorus
2024-06-28 13:35:12 +02:00
committed by Chris Hennes
parent 2aa37bce27
commit a3471e41af
2 changed files with 6 additions and 0 deletions

View File

@@ -84,6 +84,10 @@ ViewProviderMeasureBase::ViewProviderMeasureBase()
ADD_PROPERTY_TYPE(FontSize, (Preferences::defaultFontSize()), agroup, App::Prop_None, "Size of measurement text");
//NOLINTEND
pGlobalSeparator = new SoSeparator();
pGlobalSeparator->ref();
getRoot()->insertChild(pGlobalSeparator, 0);
// setupAnnoSceneGraph() - sets up the annotation scene graph
pLabel = new Gui::SoFrameLabel();
pLabel->ref();
@@ -175,6 +179,7 @@ ViewProviderMeasureBase::ViewProviderMeasureBase()
ViewProviderMeasureBase::~ViewProviderMeasureBase()
{
_mVisibilityChangedConnection.disconnect();
pGlobalSeparator->unref();
pLabel->unref();
pColor->unref();
pDragger->unref();

View File

@@ -134,6 +134,7 @@ protected:
// TODO: getters & setters and move variables to private?
bool _mShowTree = true;
SoSeparator* pGlobalSeparator; // Separator in the global coordinate space
Gui::SoFrameLabel * pLabel;
SoTranslate2Dragger* pDragger;
SoTransform* pDraggerOrientation;