tvplanit: Clear TVpMonthView's event array before painting. See https://forum.lazarus.freepascal.org/index.php/topic,62366.msg471573.html

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8713 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-02-19 12:30:17 +00:00
parent 87a257bf41
commit 3f96acc701
3 changed files with 14 additions and 4 deletions

View File

@ -88,6 +88,7 @@ procedure TVpMonthViewPainter.Clear;
begin
RenderCanvas.Brush.Color := RealColor;
RenderCanvas.FillRect(RenderIn);
FMonthView.ClearEventArray;
end;
procedure TVpMonthViewPainter.DrawBorders;
@ -579,9 +580,9 @@ begin
{ Store TextRect and Event in EventArray }
with TVpMonthViewOpener(FMonthView) do begin
mvEventArray[visibleEvents].Rec := TextRect;
mvEventArray[visibleEvents].Event := TVpEvent(EventList.List^[j]);
Inc(visibleEvents);
mvEventArray[visibleEvents - 1].Rec := TextRect;
mvEventArray[visibleEvents - 1].Event := TVpEvent(EventList.List^[j]);
end;
{ Move TextRect down one line for the next item... }
@ -807,7 +808,7 @@ begin
try
SelectClipRgn(RenderCanvas.Handle, Rgn);
{ clear client area }
{ clear client area and event array }
Clear;
{ measure the row heights }