You've already forked lazarus-ccr
tvplanit: Fix incorrect hour being displayed after midnight in DayView.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5109 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -1381,7 +1381,7 @@ var
|
|||||||
lineRect: TRect;
|
lineRect: TRect;
|
||||||
lineIndex: Integer;
|
lineIndex: Integer;
|
||||||
maxIndex: Integer;
|
maxIndex: Integer;
|
||||||
hour: Integer;
|
hour, prevHour: Integer;
|
||||||
hourStr, minuteStr, timeStr: String;
|
hourStr, minuteStr, timeStr: String;
|
||||||
isFullHour: boolean;
|
isFullHour: boolean;
|
||||||
begin
|
begin
|
||||||
@@ -1392,6 +1392,7 @@ begin
|
|||||||
|
|
||||||
y := LineRect.Top;
|
y := LineRect.Top;
|
||||||
I := 0;
|
I := 0;
|
||||||
|
prevHour := 0;
|
||||||
while true do begin
|
while true do begin
|
||||||
lineIndex := StartLine + I;
|
lineIndex := StartLine + I;
|
||||||
if lineIndex > maxIndex then
|
if lineIndex > maxIndex then
|
||||||
@@ -1400,10 +1401,13 @@ begin
|
|||||||
isFullHour := TVpDayViewOpener(FDayView).dvLineMatrix[0, LineIndex].Minute = 0;
|
isFullHour := TVpDayViewOpener(FDayView).dvLineMatrix[0, LineIndex].Minute = 0;
|
||||||
if isFullHour then begin
|
if isFullHour then begin
|
||||||
hour := Ord(TVpDayViewOpener(FDayView).dvLineMatrix[0, LineIndex].Hour);
|
hour := Ord(TVpDayViewOpener(FDayView).dvLineMatrix[0, LineIndex].Hour);
|
||||||
|
if (hour < prevHour) then
|
||||||
|
break;
|
||||||
if (hour = 0) and (I > 0) then
|
if (hour = 0) and (I > 0) then
|
||||||
break;
|
break;
|
||||||
if (StopLine > -1) and (lineIndex >= StopLine) then
|
if (StopLine > -1) and (lineIndex >= StopLine) then
|
||||||
break;
|
break;
|
||||||
|
prevHour := hour;
|
||||||
|
|
||||||
case FDayView.TimeFormat of
|
case FDayView.TimeFormat of
|
||||||
tf24Hour: minuteStr := '00';
|
tf24Hour: minuteStr := '00';
|
||||||
|
Reference in New Issue
Block a user