Recent

Author Topic: VisualPlanit change Resource issue ?  (Read 632 times)

Nicola Gorlandi

  • Full Member
  • ***
  • Posts: 132
VisualPlanit change Resource issue ?
« on: February 19, 2023, 11:41:51 am »
Hi,

I have a TVpMonthView used to show events.

In case of a resource has events for the month showned and the resource selected after do not have any events for that month, when I double click on a day then the event opened is the one related to the first resource for that day.

I found out that the procedure

Code: Pascal  [Select][+][-]
  1. procedure TVpMonthViewPainter.DrawEvents;    
  2.  

do not clear events in the mvEventArray property of Tvpmonthview.

By adding this code (in bold) it seems that the issue is fixed.

Code: Pascal  [Select][+][-]
  1.  k6I := 0;
  2.   with TVpMonthViewOpener(FMonthView) do
  3.   begin
  4.     while k6I < Length(mvEventArray) do begin
  5.       mvEventArray[k6I].Event := nil;
  6.       Inc(k6I);
  7.     end;
  8.   end;
  9.  

before
Code: Pascal  [Select][+][-]
  1.   { write the events }
  2.   if (FMonthView.DataStore <> nil) and FMonthView.ShowEvents and
  3.      (FMonthView.DataStore.Resource <> nil) and
  4.      (FMonthView.DataStore.Resource.Schedule.EventCount <> 0)    
  5.  


Many thanks

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: VisualPlanit change Resource issue ?
« Reply #1 on: February 19, 2023, 01:30:36 pm »
Fixed. Thanks for reporting.

 

TinyPortal © 2005-2018