Make decimal point optional in FormatSpec

This commit is contained in:
WandererFan
2017-11-08 09:40:44 -05:00
parent c4e10f50f6
commit f637da702d

View File

@@ -225,7 +225,7 @@ std::string DrawViewDimension::getFormatedValue()
std::string prefixSym = getPrefix(); //get Radius/Diameter/... symbol
//find the %x.y tag in FormatSpec
QRegExp rxFormat(QString::fromUtf8("%[0-9]*\\.[0-9]*[aefgAEFG]")); //printf double format spec
QRegExp rxFormat(QString::fromUtf8("%[0-9]*\\.*[0-9]*[aefgAEFG]")); //printf double format spec
QString match;
QString specVal = Base::Tools::fromStdString("%.2f"); //sensible default
pos = 0;