From 328b7b05d88ad8e7070a2bfd0014c1a0fe5433ec Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Thu, 10 Nov 2016 23:51:03 +0300 Subject: [PATCH] History: amount filter: empty line disables filter --- pages/History.qml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pages/History.qml b/pages/History.qml index 8821bb12..b4764e1c 100644 --- a/pages/History.qml +++ b/pages/History.qml @@ -233,10 +233,16 @@ Rectangle { if (advancedFilteringCheckBox.checked) { if (amountFromLine.text.length) { model.amountFromFilter = parseFloat(amountFromLine.text) + } else { + // negative value disables filter here; + model.amountFromFilter = -1; } if (amountToLine.text.length) { model.amountToFilter = parseFloat(amountToLine.text) + } else { + // negative value disables filter here; + model.amountToFilter = -1; } var directionFilter = transactionsModel.get(transactionTypeDropdown.currentIndex).value @@ -319,11 +325,6 @@ Rectangle { validator: DoubleValidator { locale: "C" notation: DoubleValidator.StandardNotation - bottom: 0.0 - top: { - console.log("top"); - parseFloat(amountToLine.text) - } } } @@ -349,10 +350,6 @@ Rectangle { validator: DoubleValidator { locale: "C" notation: DoubleValidator.StandardNotation - bottom: { - console.log("Botton") - parseFloat(amountFromLine.text) - } } }