Merge pull request #1081 from MilosKozak/AdrianLxM-patch-3

Wizard: fully undo "ok" on constraints violation
This commit is contained in:
Milos Kozak 2018-06-09 11:46:41 +02:00 committed by GitHub
commit 30dbbb12a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -315,6 +315,7 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com
confirmMessage += "<br/>" + MainApp.gs(R.string.carbs) + ": " + "<font color='" + MainApp.gc(R.color.carbs) + "'>" + carbsAfterConstraints + "g" + "</font>";
if (insulinAfterConstraints - calculatedTotalInsulin != 0 || !carbsAfterConstraints.equals(calculatedCarbs)) {
okClicked = false;
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(MainApp.gs(R.string.treatmentdeliveryerror));
builder.setMessage(MainApp.gs(R.string.constraints_violation) + "\n" + MainApp.gs(R.string.changeyourinput));