Skip to content

Commit

Permalink
FIX:TD-If "Show units" is off degree symbol is missing on angular dim…
Browse files Browse the repository at this point in the history
…ensions

+ Remove space between dimension value and degree symbol
  • Loading branch information
senjabl authored and WandererFan committed Apr 21, 2019
1 parent 6474e49 commit dde241b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Mod/TechDraw/App/DrawViewDimension.cpp
Expand Up @@ -522,13 +522,13 @@ std::string DrawViewDimension::getFormatedValue(bool obtuse)

QString repl = userVal;
if (useDecimals()) {
if (showUnits()) {
if (showUnits() || (Type.isValue("Angle")) ||(Type.isValue("Angle3Pt")) ) {
repl = userStr;
} else {
repl = userVal;
}
} else {
if (showUnits()) {
if (showUnits() || (Type.isValue("Angle")) || (Type.isValue("Angle3Pt"))) {
repl = specVal + userUnits;
} else {
repl = specVal;
Expand All @@ -541,6 +541,11 @@ std::string DrawViewDimension::getFormatedValue(bool obtuse)
if (loc.decimalPoint() != dp) {
specStr.replace(dp,loc.decimalPoint());
}
//Remove space between dimension and degree sign
if ((Type.isValue("Angle")) || (Type.isValue("Angle3Pt"))) {
QRegExp space(QString::fromUtf8("\\s"));
specStr.remove(space);
}
}

return specStr.toUtf8().constData();
Expand Down

0 comments on commit dde241b

Please sign in to comment.