Commit f6c4e599 authored by Thorsten Zachmann's avatar Thorsten Zachmann

Fix problems due to Qt5 porting in KoUnitDoubleSpinBox.

The input fields (KoUnitDoubleSpinBox) in the Vectorshape tool e.g. for position
and line thickness can't be used. Entering a different value by the keyboard
results in 0 value of the value changed.
Also the fields should show only 2 digest as configured and not 6 or more.
parent 20ad37de
......@@ -200,12 +200,14 @@ QString KoUnitDoubleSpinBox::textFromValue( double value ) const
//debugWidgets <<"textFromValue:" << QString::number( value, 'f', 12 ) <<" =>" << num;
//const QString num(QString("%1%2").arg(QLocale().toString(value, d->precision ), m_unit.symbol()));
//const QString num ( QString( "%1").arg( QLocale().toString( value, d->precision )) );
return QLocale().toString( value, decimals() );
return QLocale().toString( value, 'f', decimals() );
double KoUnitDoubleSpinBox::valueFromText( const QString& str ) const
return QLocale().toDouble(str);
QString str2( str );
return QLocale().toDouble(str2);
// QString str2( str );
// /* KLocale::readNumber wants the thousand separator exactly at 1000.
// But when editing, it might be anywhere. So we need to remove it. */
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment