[GUI] Allow origin plane/axis selection with entire label bounding box

This commit is contained in:
0penBrain
2022-01-19 17:16:37 +01:00
committed by wwmayer
parent ec00d35c5f
commit e4bc11d973
2 changed files with 10 additions and 0 deletions

View File

@@ -29,6 +29,7 @@
# include <Inventor/nodes/SoCoordinate3.h>
# include <Inventor/nodes/SoFont.h>
# include <Inventor/nodes/SoIndexedLineSet.h>
# include <Inventor/nodes/SoPickStyle.h>
# include <Inventor/nodes/SoSeparator.h>
# include <Inventor/nodes/SoTranslation.h>
#endif
@@ -76,5 +77,9 @@ void ViewProviderLine::attach ( App::DocumentObject *obj ) {
textTranslation->translation.setValue ( SbVec3f ( -size * 49. / 50., size / 30., 0 ) );
sep->addChild ( textTranslation );
SoPickStyle *ps = new SoPickStyle();
ps->style.setValue(SoPickStyle::BOUNDING_BOX);
sep->addChild(ps);
sep->addChild ( getLabel () );
}

View File

@@ -29,6 +29,7 @@
# include <Inventor/nodes/SoCoordinate3.h>
# include <Inventor/nodes/SoFont.h>
# include <Inventor/nodes/SoIndexedLineSet.h>
# include <Inventor/nodes/SoPickStyle.h>
# include <Inventor/nodes/SoSeparator.h>
# include <Inventor/nodes/SoTranslation.h>
#endif
@@ -78,5 +79,9 @@ void ViewProviderPlane::attach ( App::DocumentObject *obj ) {
textTranslation->translation.setValue ( SbVec3f ( -size * 49. / 50., size * 9./10., 0 ) );
sep->addChild ( textTranslation );
SoPickStyle *ps = new SoPickStyle();
ps->style.setValue(SoPickStyle::BOUNDING_BOX);
sep->addChild(ps);
sep->addChild ( getLabel () );
}