[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [skrooge] /: BUG:320240
From: Stephane MANKOWSKI <stephane () mankowski ! fr>
Date: 2013-05-25 8:18:43
Message-ID: 20130525081843.9B2C1A605B () git ! kde ! org
[Download RAW message or body]
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.cpp
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 template
+ *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 (example: \
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(const \
SKGObjectBase::SKGListS
//We ask to the user if he wants to continue or convert into the \
target account bool ok = false;
QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
+ int decimal=qMax(unit.getNumberDecimal(), unitTargetAccount.getNumberDecimal());
double newval = KInputDialog::getDouble(i18nc("Question", \
"Confirmation"),
i18nc("Question", "The \
operation's unit is not compatible with the target account.\n"
"Click Cancel if you \
want to continue anyway; "
"otherwise, enter \
the value in the target account's unit (%1):", \
unitTargetAccount.getSymbol()),
\
SKGUnitObject::convert(operationQuantity, unit, unitTargetAccount),
- -DBL_MAX, DBL_MAX, 2, &ok, \
this); + -DBL_MAX, DBL_MAX, \
0.1, decimal, &ok, this); QApplication::restoreOverrideCursor();
if (ok) {
operationQuantity = newval;
@@ -889,12 +890,13 @@ SKGError SKGOperationPluginWidget::updateSelection(const \
SKGObjectBase::SKGListS
//We ask to the user if he wants to continue or convert into the \
target account
QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
double currentAmount = ui.kAmountEdit->value();
+ int decimal=qMax(unit.getNumberDecimal(), \
unitTargetAccount.getNumberDecimal());
double newval = KInputDialog::getDouble(i18nc("Question", \
"Confirmation"),
i18nc("Question", "The \
operation's unit is not compatible with the target account.\n"
"Click Cancel if \
you want to continue anyway; "
"otherwise, \
enter the value in the target account's unit (%1):", \
unitTargetAccount.getSymbol()),
\
SKGUnitObject::convert(currentAmount, unit, unitTargetAccount),
- -DBL_MAX, DBL_MAX, 2, \
&ok, this); + -DBL_MAX, \
DBL_MAX, 0.1, decimal, &ok, this); ratio = newval / currentAmount;
QApplication::restoreOverrideCursor();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic