lcl: don't call Change two times when TDateEdit changes (fixes issue #0014977)

git-svn-id: trunk@23213 -
This commit is contained in:
paul 2009-12-21 10:12:25 +00:00
parent d08379fcd7
commit c238c57405
2 changed files with 15 additions and 14 deletions

View File

@ -1081,13 +1081,14 @@ begin
Text := ''
else
begin
If (FDateFormat='') then
if (FDateFormat = '') then
Text := DateToStr(Value)
else
Text := FormatDateTime(FDateFormat, Value)
end;
if D <> Date then
Change;
// don't call Change - it is called by assignment to Text
// if D <> Date then
// Change;
end;
procedure TDateEdit.CalendarPopupReturnDate(Sender: TObject;
@ -1097,7 +1098,7 @@ var
D: TDateTime;
begin
try
B:=true;
B := True;
D := ADate;
if Assigned(FOnAcceptDate) then
FOnAcceptDate(Self, D, B);

View File

@ -137,7 +137,7 @@ end;
procedure TCalendarPopupForm.ReturnDate;
begin
if assigned(FOnReturnDate) then
if Assigned(FOnReturnDate) then
FOnReturnDate(Self, Calendar.DateTime);
if not FClosed then
Close;