diff --git a/components/tvplanit/examples/datastores/bufdataset/project1.lpi b/components/tvplanit/examples/datastores/bufdataset/project1.lpi index 4f661d701..31e45ec8a 100644 --- a/components/tvplanit/examples/datastores/bufdataset/project1.lpi +++ b/components/tvplanit/examples/datastores/bufdataset/project1.lpi @@ -1,7 +1,7 @@ - + @@ -17,9 +17,10 @@ - - - + + + + diff --git a/components/tvplanit/source/vpbaseds.pas b/components/tvplanit/source/vpbaseds.pas index aebc0bf2c..eca096991 100644 --- a/components/tvplanit/source/vpbaseds.pas +++ b/components/tvplanit/source/vpbaseds.pas @@ -657,12 +657,12 @@ begin DecodeDate(OldDate, oy, om, Day); DecodeDate(FActiveDate, ny, nm, Day); - { If the date has reached the end of the data buffer } - if (FActiveDate >= FTimeRange.EndTime) - or (FActiveDate <= FTimeRange.StartTime) - { or the month or year has changed... } - or (nm <> om) or (ny <> oy) then begin - { then load the data that falls into the current time range } + { If the date has reached the end of the data buffer ... } + if (FActiveDate >= FTimeRange.EndTime) or (FActiveDate <= FTimeRange.StartTime) + { ... or the month or year has changed ... } + or (nm <> om) or (ny <> oy) then + begin + { ... then load the data that falls into the current time range } SetRange(FActiveDate - FDayBuffer, FActiveDate + FDayBuffer); RefreshEvents; end; diff --git a/components/tvplanit/source/vpmonthview.pas b/components/tvplanit/source/vpmonthview.pas index efce3748c..a8b8dac92 100644 --- a/components/tvplanit/source/vpmonthview.pas +++ b/components/tvplanit/source/vpmonthview.pas @@ -1021,15 +1021,15 @@ procedure TVpMonthView.WMLButtonDown(var Msg: TLMLButtonDown); begin inherited; // if the mouse was pressed down in the client area, then select the cell. - if not focused then SetFocus; + if not Focused then SetFocus; if (Msg.YPos > mvDayHeadHeight) then begin { The mouse click landed inside the client area } MvSetDateByCoord(Point(Msg.XPos, Msg.YPos)); { Did the mouse click land on an event? } - if SelectEventAtCoord(Point(Msg.XPos, Msg.YPos)) - and (Assigned(FOnEventClick)) then + if SelectEventAtCoord(Point(Msg.XPos, Msg.YPos)) then + if (Assigned(FOnEventClick)) then FOnEventClick(self, mvActiveEvent); end; end;