Git commit 2cc5b62d026f3605f6635f74eea5fe56dbc3d7c3 by Stephane MANKOWSKI. Committed on 25/05/2013 at 10:18. Pushed by smankowski into branch 'master'. BUG:320240 Impossible to enter exact amount for given unit in pop-up M +1 -0 CHANGELOG M +4 -2 plugins/skrooge/skrooge_operation/skgoperationpluginwidget.c= pp http://commits.kde.org/skrooge/2cc5b62d026f3605f6635f74eea5fe56dbc3d7c3 diff --git a/CHANGELOG b/CHANGELOG index 8c69cd5..9b1132d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ skrooge (1.8.0) *Correction bug 320114: Wrong bank balance at dashboard *Correction bug 320112: Importing CSV operations with mixed " and ' text= field separators *Correction bug 320226: Monthly report does not work due to missing temp= late + *Correction bug 320240: Impossible to enter exact amount for given unit = in pop-up *Correction: Addition of all icons in size 256 and 512 = *Correction: Block drop of a bookmark under an other bookmark *Correction: Bad date format detection when the second value is 9 (examp= le: 3/9/04) diff --git a/plugins/skrooge/skrooge_operation/skgoperationpluginwidget.cpp= b/plugins/skrooge/skrooge_operation/skgoperationpluginwidget.cpp index b94dd16..c9e7ab1 100644 --- a/plugins/skrooge/skrooge_operation/skgoperationpluginwidget.cpp +++ b/plugins/skrooge/skrooge_operation/skgoperationpluginwidget.cpp @@ -784,12 +784,13 @@ SKGError SKGOperationPluginWidget::updateSelection(co= nst SKGObjectBase::SKGListS //We ask to the user if he wants to continue or convert in= to the target account bool ok =3D false; QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor)); + int decimal=3DqMax(unit.getNumberDecimal(), unitTargetAccount.getNumberD= ecimal()); double newval =3D KInputDialog::getDouble(i18nc("Question"= , "Confirmation"), i18nc("Question", = "The operation's unit is not compatible with the target account.\n" "Click Can= cel if you want to continue anyway; " "otherwise= , enter the value in the target account's unit (%1):", unitTargetAccount.ge= tSymbol()), SKGUnitObject::con= vert(operationQuantity, unit, unitTargetAccount), - -DBL_MAX, DBL_MAX,= 2, &ok, this); + -DBL_MAX, DBL_MAX,= 0.1, decimal, &ok, this); QApplication::restoreOverrideCursor(); if (ok) { operationQuantity =3D newval; @@ -889,12 +890,13 @@ SKGError SKGOperationPluginWidget::updateSelection(co= nst SKGObjectBase::SKGListS //We ask to the user if he wants to continue or conver= t into the target account QApplication::setOverrideCursor(QCursor(Qt::ArrowCurso= r)); double currentAmount =3D ui.kAmountEdit->value(); + int decimal=3DqMax(unit.getNumberDecimal(), unitTargetAccount.getNum= berDecimal()); = double newval =3D KInputDialog::getDouble(i18nc("Quest= ion", "Confirmation"), i18nc("Questio= n", "The operation's unit is not compatible with the target account.\n" "Click= Cancel if you want to continue anyway; " "other= wise, enter the value in the target account's unit (%1):", unitTargetAccoun= t.getSymbol()), SKGUnitObject:= :convert(currentAmount, unit, unitTargetAccount), - -DBL_MAX, DBL_= MAX, 2, &ok, this); + -DBL_MAX, DBL_= MAX, 0.1, decimal, &ok, this); = ratio =3D newval / currentAmount; QApplication::restoreOverrideCursor(); }