Skip to content

Commit

Permalink
Reverted bad change for the calculation of the duration inside Durati…
Browse files Browse the repository at this point in the history
…onPickerSkin.
  • Loading branch information
dlemmermann committed Apr 3, 2024
1 parent 52fc159 commit cef5506
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,11 @@ private void updateValue() {
Duration duration = Duration.ZERO;
for (ChronoUnit unit : getSkinnable().getFields()) {
Segment<Duration, Long> segment = segmentMap.get(unit);
duration = duration.plus(segment.getValue(), unit);
Long value = segment.getValue();
if (value != null) {
duration = duration.plus(value, unit);
}
}

getSkinnable().setValue(duration);
} finally {
updatingValue = false;
Expand Down

0 comments on commit cef5506

Please sign in to comment.