FIX:TD-If "Show units" is off degree symbol is missing on angular dimensions

+ Remove space between dimension value and degree symbol
This commit is contained in:
babaroga
2019-04-20 17:08:41 +02:00
committed by WandererFan
parent a7dcfe4ab7
commit 5cb48e5360

View File

@@ -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;
@@ -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();