mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-02 06:23:35 +01:00
DateTimePicker - improved 54652
git-svn-id: trunk@54653 -
This commit is contained in:
parent
1ed8c064f8
commit
c954ed4518
@ -1922,13 +1922,19 @@ end;
|
||||
|
||||
procedure TCustomDateTimePicker.UndoChanges;
|
||||
begin
|
||||
FDateTime := FConfirmedDateTime;
|
||||
Inc(FSkipChangeInUpdateDate);
|
||||
try
|
||||
if FDateTime = FConfirmedDateTime then begin
|
||||
Inc(FSkipChangeInUpdateDate); // prevents calling Change in UpdateDate,
|
||||
try // but UpdateDate should be called anyway, because user might have
|
||||
// changed text on screen and it should be updated to what it was.
|
||||
UpdateDate;
|
||||
finally
|
||||
Dec(FSkipChangeInUpdateDate);
|
||||
end;
|
||||
end else begin
|
||||
FDateTime := FConfirmedDateTime;
|
||||
UpdateDate;
|
||||
finally
|
||||
Dec(FSkipChangeInUpdateDate);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
{ GetDateTimePartFromTextPart function
|
||||
|
||||
Loading…
Reference in New Issue
Block a user