Extended global marker size to be used for other modes

This commit is contained in:
JimStar
2018-07-08 15:03:29 +12:00
committed by Yorik van Havre
parent 502a9d5f05
commit 6a5ad383ab
10 changed files with 102 additions and 27 deletions

View File

@@ -50,6 +50,7 @@
#include <App/MeasureDistance.h>
#include <Base/Console.h>
#include <Base/Quantity.h>
#include <Inventor/MarkerBitmaps.h>
using namespace Gui;
@@ -168,7 +169,7 @@ void ViewProviderMeasureDistance::attach(App::DocumentObject* pcObject)
lineSep->addChild(pCoords);
lineSep->addChild(pLines);
SoMarkerSet* points = new SoMarkerSet();
points->markerIndex = SoMarkerSet::CROSS_9_9;
points->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex("CROSS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 9));
points->numPoints=2;
lineSep->addChild(points);
@@ -287,7 +288,7 @@ ViewProviderPointMarker::ViewProviderPointMarker()
pCoords->ref();
pCoords->point.setNum(0);
pMarker = new SoMarkerSet();
pMarker->markerIndex = SoMarkerSet::CROSS_9_9;
pMarker->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex("CROSS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 9));
pMarker->numPoints=0;
pMarker->ref();