From 7ebf53e94dffb9f7c98d9adf129ad4da491d9353 Mon Sep 17 00:00:00 2001 From: Syres916 <46537884+Syres916@users.noreply.github.com> Date: Sat, 16 Oct 2021 12:20:55 +0100 Subject: [PATCH] [Sketcher] Minor bugfix to display angle... ...constraint names as per recommendation, see discussion https://forum.freecadweb.org/viewtopic.php?f=3&t=62953 --- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 698dadd0a4..c3a89f5c12 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -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(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;