Commit 766376a0 authored by SZPYRKA Jean-Luc's avatar SZPYRKA Jean-Luc

a little fix

parent 9d23a4ab
...@@ -64,7 +64,6 @@ QString dtkDoubleSpinBoxPrivate::textFromValue ( double value ) const ...@@ -64,7 +64,6 @@ QString dtkDoubleSpinBoxPrivate::textFromValue ( double value ) const
return strValue; return strValue;
} }
#include <cstdlib>
double dtkDoubleSpinBoxPrivate::valueFromText ( const QString & text ) const double dtkDoubleSpinBoxPrivate::valueFromText ( const QString & text ) const
{ {
// truncate the input text to the right decimal // truncate the input text to the right decimal
...@@ -87,11 +86,13 @@ double dtkDoubleSpinBoxPrivate::valueFromText ( const QString & text ) const ...@@ -87,11 +86,13 @@ double dtkDoubleSpinBoxPrivate::valueFromText ( const QString & text ) const
} }
QString result = int_dec[0] + "." + int_dec[1]; QString result = int_dec[0] + "." + int_dec[1];
if ( this->scientific && mant_exp.size() > 1) { if ( this->scientific ) {
result += "e" + mant_exp[1]; if (mant_exp.size() > 1) {
} result += "e" + mant_exp[1];
else { }
result += "e+0" ; else {
result += "e+0" ;
}
} }
double dblValue = result.toDouble(); double dblValue = result.toDouble();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment