tvplanit: Cosmetic changes

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6513 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-06-20 05:28:45 +00:00
parent e90700a648
commit da23bd4405
3 changed files with 14 additions and 13 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="10"/>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
@ -17,9 +17,10 @@
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>

View File

@ -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;

View File

@ -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;