[Sketcher] Minor bugfix to display angle...

...constraint names as per recommendation, see discussion https://forum.freecadweb.org/viewtopic.php?f=3&t=62953
This commit is contained in:
Syres916
2021-10-16 12:20:55 +01:00
committed by GitHub
parent 0926a4148b
commit 7ebf53e94d

View File

@@ -3193,7 +3193,7 @@ QString ViewProviderSketch::getPresentationString(const Constraint *constraint)
// Hide units if user has requested it, is being displayed in the base
// units, and the schema being used has a clear base unit in the first
// place. Otherwise, display units.
if( iHideUnits )
if( iHideUnits && constraint->Type != Sketcher::Angle )
{
// Only hide the default length unit. Right now there is not an easy way
// to get that from the Unit system so we have to manually add it here.
@@ -5766,7 +5766,7 @@ Restart:
break;
SoDatumLabel *asciiText = static_cast<SoDatumLabel *>(sep->getChild(CONSTRAINT_SEPARATOR_INDEX_MATERIAL_OR_DATUMLABEL));
asciiText->string = SbString(Constr->getPresentationValue().getUserString().toUtf8().constData());
asciiText->string = SbString( getPresentationString(Constr).toUtf8().constData() );
asciiText->datumtype = SoDatumLabel::ANGLE;
asciiText->param1 = Constr->LabelDistance;
asciiText->param2 = startangle;