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,12 +86,14 @@ double dtkDoubleSpinBoxPrivate::valueFromText ( const QString & text ) const ...@@ -87,12 +86,14 @@ 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 ) {
if (mant_exp.size() > 1) {
result += "e" + mant_exp[1]; result += "e" + mant_exp[1];
} }
else { else {
result += "e+0" ; result += "e+0" ;
} }
}
double dblValue = result.toDouble(); double dblValue = result.toDouble();
//q->lineEdit()->blockSignals(true); // protected !! //q->lineEdit()->blockSignals(true); // protected !!
......
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