mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 22:19:18 +02:00
Qt: fixed events of TQtCalendar. issue #27125
git-svn-id: trunk@47080 -
This commit is contained in:
parent
00ec38b2e0
commit
ab1a88f474
@ -16726,29 +16726,17 @@ var
|
|||||||
Msg: TLMessage;
|
Msg: TLMessage;
|
||||||
ADate: QDateH;
|
ADate: QDateH;
|
||||||
HasChanges: Boolean;
|
HasChanges: Boolean;
|
||||||
|
TempYear, TempMonth: Integer;
|
||||||
begin
|
begin
|
||||||
{$IFDEF VerboseQt}
|
{$IFDEF VerboseQt}
|
||||||
writeln('TQtCalendar.SignalCurrentPageChanged p1=',p1,' p2=',p2);
|
writeln('TQtCalendar.SignalCurrentPageChanged p1=',p1,' p2=',p2,' AMonth=',AMonth,' AYear=',AYear);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if InUpdate then
|
if InUpdate then
|
||||||
exit;
|
exit;
|
||||||
|
TempYear := AYear;
|
||||||
|
TempMonth := AMonth;
|
||||||
FillChar(Msg{%H-}, SizeOf(Msg), #0);
|
FillChar(Msg{%H-}, SizeOf(Msg), #0);
|
||||||
HasChanges := (AYear <> p1) or (AMonth <> p2);
|
HasChanges := (TempYear <> p1) or (TempMonth <> p2);
|
||||||
if AYear <> p1 then
|
|
||||||
begin
|
|
||||||
Msg.Msg := LM_YEARCHANGED;
|
|
||||||
DeliverMessage(Msg);
|
|
||||||
Msg.Msg := LM_CHANGED;
|
|
||||||
DeliverMessage(Msg);
|
|
||||||
end;
|
|
||||||
|
|
||||||
if AMonth <> p2 then
|
|
||||||
begin
|
|
||||||
Msg.Msg := LM_MONTHCHANGED;
|
|
||||||
DeliverMessage(Msg);
|
|
||||||
Msg.Msg := LM_CHANGED;
|
|
||||||
DeliverMessage(Msg);
|
|
||||||
end;
|
|
||||||
|
|
||||||
if HasChanges then
|
if HasChanges then
|
||||||
begin
|
begin
|
||||||
@ -16761,6 +16749,24 @@ begin
|
|||||||
QDate_destroy(ADate);
|
QDate_destroy(ADate);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if TempYear <> p1 then
|
||||||
|
begin
|
||||||
|
Msg.Msg := LM_YEARCHANGED;
|
||||||
|
DeliverMessage(Msg);
|
||||||
|
end;
|
||||||
|
|
||||||
|
if TempMonth <> p2 then
|
||||||
|
begin
|
||||||
|
Msg.Msg := LM_MONTHCHANGED;
|
||||||
|
DeliverMessage(Msg);
|
||||||
|
end;
|
||||||
|
|
||||||
|
if HasChanges then
|
||||||
|
begin
|
||||||
|
Msg.Msg := LM_CHANGED;
|
||||||
|
DeliverMessage(Msg);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TQtHintWindow }
|
{ TQtHintWindow }
|
||||||
|
Loading…
Reference in New Issue
Block a user