tvplanit: Fix double-click in MonthView not working any more for events beginning in previous month

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8551 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-10-13 11:40:55 +00:00
parent 72217cba80
commit 26581143a8
2 changed files with 18 additions and 14 deletions

View File

@ -1354,6 +1354,7 @@ var
I: Integer;
y1, m1, d1: Word;
y2, m2, d2: Word;
y3, m3, d3: Word;
begin
Result := false;
@ -1367,7 +1368,8 @@ begin
if PtInRect(mvEventArray[I].Rec, Point) then
begin
DecodeDate(TVpEvent(mvEventArray[I].Event).StartTime, y2, m2, d2);
if (y1 = y2) and (m1 = m2) then
DecodeDate(TVpEvent(mvEventArray[I].Event).EndTime, y3, m3, d3);
if ((y1 = y2) and (m1 = m2)) or ((y1 = y3) and (m1 = m3)) then
begin
mvActiveEvent := TVpEvent(mvEventArray[I].Event);
mvActiveEventRec := mvEventArray[I].Rec;