Wizard: fully undo "ok" on constraints violation

Fixes https://github.com/MilosKozak/AndroidAPS/issues/1056
This commit is contained in:
AdrianLxM 2018-06-07 22:44:09 +02:00 committed by GitHub
parent 9e099ec741
commit d6184cc151
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));