From 2294093aab191f4476c4924a3869ab3d28eb0d49 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Mon, 31 Oct 2016 13:01:50 +0100 Subject: [PATCH] Show current total The total of the calculation in the wizard was showing the value from the previous calculation when you enable/disable to include Bolus-IOB or Basal-IOB into the calculation. The button to send to the pump showed the current amount of units. --- .../androidaps/plugins/Overview/Dialogs/WizardDialog.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java index 783c16a7d5..3f38189b48 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java @@ -378,6 +378,7 @@ public class WizardDialog extends DialogFragment implements OnClickListener { basalIobInsulin.setText(DecimalFormatter.to2Decimal(wizard.insulingFromBasalsIOB) + "U"); correctionInsulin.setText(DecimalFormatter.to2Decimal(wizard.insulinFromCorrection) + "U"); + calculatedTotalInsulin = wizard.calculatedTotalInsulin; if (calculatedTotalInsulin < 0) { total.setText(getString(R.string.missing) + " " + DecimalFormatter.to0Decimal(wizard.carbsEquivalent) + "g"); @@ -388,7 +389,6 @@ public class WizardDialog extends DialogFragment implements OnClickListener { } calculatedCarbs = carbsAfterConstraint; - calculatedTotalInsulin = wizard.calculatedTotalInsulin; if (calculatedTotalInsulin > 0d || calculatedCarbs > 0d) { String insulinText = calculatedTotalInsulin > 0d ? (DecimalFormatter.to2Decimal(calculatedTotalInsulin) + "U") : ""; @@ -422,4 +422,4 @@ public class WizardDialog extends DialogFragment implements OnClickListener { e.printStackTrace(); } } -} \ No newline at end of file +}