Part: make DimensionLinear node kit unpickable

See forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=69056
This commit is contained in:
wmayer
2022-05-30 15:43:27 +02:00
parent e13e3bcea3
commit 8edb3e64cc

View File

@@ -63,6 +63,7 @@
# include <Inventor/engines/SoComposeRotationFromTo.h>
# include <Inventor/engines/SoComposeRotation.h>
# include <Inventor/nodes/SoMaterial.h>
# include <Inventor/nodes/SoPickStyle.h>
#endif
#include <Base/Console.h>
@@ -408,6 +409,11 @@ SbBool PartGui::DimensionLinear::affectsState() const
void PartGui::DimensionLinear::setupDimension()
{
//make unpickable
SoPickStyle* ps = static_cast<SoPickStyle*>(getPart("pickStyle", true));
if (ps)
ps->style = SoPickStyle::UNPICKABLE;
//transformation
SoTransform *trans = static_cast<SoTransform *>(getPart("transformation", true));
trans->translation.connectFrom(&point1);