Sketcher: Make setposition text unpickable

==========================================

fixes #4272

The setposition text string was being picked interfering with preselection of autoconstraints.

Merit for the solution goes to Werner:
https://forum.freecadweb.org/viewtopic.php?f=10&t=47092&p=404519#p404519
This commit is contained in:
Abdullah Tahiri
2020-06-01 16:09:48 +02:00
committed by abdullahtahiriyo
parent e09f824b1a
commit f086580013

View File

@@ -6008,6 +6008,9 @@ void ViewProviderSketch::createEditInventorNodes(void)
// stuff for the edit coordinates ++++++++++++++++++++++++++++++++++++++
SoSeparator *Coordsep = new SoSeparator();
SoPickStyle* ps = new SoPickStyle();
ps->style.setValue(SoPickStyle::UNPICKABLE);
Coordsep->addChild(ps);
Coordsep->setName("CoordSeparator");
// no caching for fluctuand data structures
Coordsep->renderCaching = SoSeparator::OFF;
@@ -6226,8 +6229,7 @@ void ViewProviderSketch::setPositionText(const Base::Vector2d &Pos)
{
SbString text;
text.sprintf(" (%.1f,%.1f)", Pos.x, Pos.y);
edit->textX->string = text;
edit->textPos->translation = SbVec3f(Pos.x,Pos.y,zText);
setPositionText(Pos,text);
}
void ViewProviderSketch::resetPositionText(void)