Merge pull request #1253 from jotomo/hypo-tt-correction
NewCarbsDialog: correct situation where Hypo TT can't be unchecked.
This commit is contained in:
commit
088c423208
1 changed files with 4 additions and 2 deletions
|
@ -157,10 +157,12 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, C
|
||||||
|
|
||||||
BgReading bgReading = DatabaseHelper.actualBg();
|
BgReading bgReading = DatabaseHelper.actualBg();
|
||||||
if (bgReading != null && bgReading.value < 72) {
|
if (bgReading != null && bgReading.value < 72) {
|
||||||
startHypoTTCheckbox.setOnCheckedChangeListener(null);
|
|
||||||
startHypoTTCheckbox.setChecked(true);
|
startHypoTTCheckbox.setChecked(true);
|
||||||
|
// see #onCheckedChanged why listeners are registered like this
|
||||||
|
startHypoTTCheckbox.setOnClickListener(this);
|
||||||
|
} else {
|
||||||
|
startHypoTTCheckbox.setOnCheckedChangeListener(this);
|
||||||
}
|
}
|
||||||
startHypoTTCheckbox.setOnCheckedChangeListener(this);
|
|
||||||
|
|
||||||
setCancelable(true);
|
setCancelable(true);
|
||||||
getDialog().setCanceledOnTouchOutside(false);
|
getDialog().setCanceledOnTouchOutside(false);
|
||||||
|
|
Loading…
Reference in a new issue