Skip to content

Commit

Permalink
Sketcher: Make setposition text unpickable
Browse files Browse the repository at this point in the history
==========================================

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
  • Loading branch information
abdullahtahiriyo committed Jun 1, 2020
1 parent e09f824 commit f086580
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f086580

Please sign in to comment.