1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-23 08:43:15 +02:00

Evaluate gauge view value in edit mode as well

Otherwise the gauge view will show "Can't evaluate the value" if the
measurement view is opened in edit mode.
This commit is contained in:
Erik Johansson
2017-11-21 00:37:10 +01:00
parent 25a9fdfccc
commit 89b732aada

View File

@@ -294,7 +294,7 @@ public abstract class MeasurementView extends TableLayout {
try{
Float floatValue = Float.parseFloat(value);
if (measurementMode == VIEW) {
if (measurementMode == VIEW || measurementMode == EDIT) {
evaluate(floatValue);
}
valueView.setText(String.format("%.2f ", floatValue) + getUnit());