mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 10:39:18 +02:00
lcl: don't call Change two times when TDateEdit changes (fixes issue #0014977)
git-svn-id: trunk@23213 -
This commit is contained in:
parent
d08379fcd7
commit
c238c57405
@ -1081,13 +1081,14 @@ begin
|
|||||||
Text := ''
|
Text := ''
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
If (FDateFormat='') then
|
if (FDateFormat = '') then
|
||||||
Text := DateToStr(Value)
|
Text := DateToStr(Value)
|
||||||
else
|
else
|
||||||
Text := FormatDateTime(FDateFormat, Value)
|
Text := FormatDateTime(FDateFormat, Value)
|
||||||
end;
|
end;
|
||||||
if D <> Date then
|
// don't call Change - it is called by assignment to Text
|
||||||
Change;
|
// if D <> Date then
|
||||||
|
// Change;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDateEdit.CalendarPopupReturnDate(Sender: TObject;
|
procedure TDateEdit.CalendarPopupReturnDate(Sender: TObject;
|
||||||
@ -1097,7 +1098,7 @@ var
|
|||||||
D: TDateTime;
|
D: TDateTime;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
B:=true;
|
B := True;
|
||||||
D := ADate;
|
D := ADate;
|
||||||
if Assigned(FOnAcceptDate) then
|
if Assigned(FOnAcceptDate) then
|
||||||
FOnAcceptDate(Self, D, B);
|
FOnAcceptDate(Self, D, B);
|
||||||
|
@ -137,7 +137,7 @@ end;
|
|||||||
|
|
||||||
procedure TCalendarPopupForm.ReturnDate;
|
procedure TCalendarPopupForm.ReturnDate;
|
||||||
begin
|
begin
|
||||||
if assigned(FOnReturnDate) then
|
if Assigned(FOnReturnDate) then
|
||||||
FOnReturnDate(Self, Calendar.DateTime);
|
FOnReturnDate(Self, Calendar.DateTime);
|
||||||
if not FClosed then
|
if not FClosed then
|
||||||
Close;
|
Close;
|
||||||
|
Loading…
Reference in New Issue
Block a user