tvplanit: Fix countdown timer not stopping at end.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5043 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-07-28 22:33:42 +00:00
parent 28fbce4056
commit 48dab069a8

View File

@ -735,6 +735,12 @@ begin
cmTimer: { Count-up timer } cmTimer: { Count-up timer }
SetTime(elapsed); SetTime(elapsed);
cmCountDownTimer: { Count-down timer } cmCountDownTimer: { Count-down timer }
if abs(FCountdownStartTime - elapsed) < 0.1 / SecondsInDay then
begin
SetTime(0);
Active := false;
DoOnCountdownDone;
end else
SetTime(FCountdownStartTime - elapsed); SetTime(FCountdownStartTime - elapsed);
end; end;
end; end;