tvplanit: Remove a few unused variables in DayViewPainter

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4838 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-06-26 08:14:09 +00:00
parent d6961421d3
commit 48bdc3b5c6
3 changed files with 12 additions and 18 deletions

View File

@ -25,9 +25,9 @@ object MainForm: TMainForm
Height = 532
Top = 48
Width = 780
ActivePage = TabEvents
ActivePage = TabResources
Align = alClient
TabIndex = 0
TabIndex = 3
TabOrder = 0
object TabEvents: TTabSheet
Caption = 'Events'

View File

@ -2049,6 +2049,7 @@ begin
{ for simplicity, bail out of editing while scrolling. }
EndEdit(Self);
// wp: Next line should never happen after EndEdit...
if (dvInPlaceEditor <> nil) and dvInplaceEditor.Visible then Exit;
case Msg.ScrollCode of

View File

@ -30,9 +30,6 @@ type
CellsRect: TRect;
RowHeadRect: TRect;
ADEventsRect: TRect;
SaveBrushColor: TColor;
SavePenStyle: TPenStyle;
SavePenColor: TColor;
Drawn: Boolean;
ScrollBarOffset: Integer;
EventCount: Integer;
@ -78,9 +75,10 @@ type
OldFont: TFont;
protected
function CountOverlappingEvents(Event: TVpEvent; const EArray: TVpDvEventArray): Integer;
function CountOverlappingEvents(Event: TVpEvent;
const EArray: TVpDvEventArray): Integer;
procedure CreateBitmaps;
function DetermineIconRect(AEventRect: TRect; AEvent: TVpEvent): TRect;
function DetermineIconRect(AEventRect: TRect): TRect;
function GetMaxOLEvents(Event: TVpEvent; const EArray: TVpDvEventArray): Integer;
procedure DrawAllDayEvents;
procedure DrawAllDays;
@ -97,7 +95,6 @@ type
procedure InitColors;
procedure InitializeEventRectangles;
procedure ScaleIcons(EventRect: TRect);
procedure SetMeasurements; override;
public
@ -181,8 +178,7 @@ begin
dvBmpCustom := TBitmap.Create;
end;
function TVpDayViewPainter.DetermineIconRect(AEventRect: TRect;
AEvent: TVpEvent): TRect;
function TVpDayViewPainter.DetermineIconRect(AEventRect: TRect): TRect;
var
MaxHeight: Integer;
begin
@ -729,10 +725,11 @@ begin
{ Initialize, collect useful information needed later }
EventCategory := FDayView.Datastore.CategoryColorMap.GetCategory(AEvent.Category);
EventIsEditing := false;
with TVpDayViewOpener(FDayView) do
if (dvInplaceEditor <> nil) and dvInplaceEditor.Visible then
EventIsEditing := (ActiveEvent = AEvent);
EventIsEditing := (ActiveEvent = AEvent)
else
EventIsEditing := false;
timeFmt := IfThen(FDayView.TimeFormat = tf24Hour, 'h:nn', 'h:nnam/pm');
@ -868,12 +865,12 @@ begin
GetIcons(AEvent);
if AEventRec.Level = 0 then begin
ScaleIcons(EventRect);
IconRect := DetermineIconRect(EventRect, AEvent);
IconRect := DetermineIconRect(EventRect);
end else begin
tmpRect := EventRect;
inc(tmpRect.Left, FDayView.GutterWidth);
ScaleIcons(tmpRect);
IconRect := DetermineIconRect(tmpRect, AEvent);
IconRect := DetermineIconRect(tmpRect);
end;
end;
@ -1064,7 +1061,6 @@ procedure TVpDayViewPainter.DrawEvents(ARenderDate: TDateTime; Col: Integer);
var
I,J: Integer;
Level: Integer;
STime, ETime: Double;
Event: TVpEvent;
SaveFont: TFont;
SaveColor: TColor;
@ -1165,9 +1161,6 @@ begin
VisibleRect := TVpDayViewOpener(FDayView).dvLineMatrix[Col, StartLine].Rec;
VisibleRect.Bottom := FDayView.ClientRect.Bottom;
STime := TVpDayViewOpener(FDayView).dvLineMatrix[0, StartLine].Time;
ETime := TVpDayViewOpener(FDayView).dvLineMatrix[0, StartLine + RealVisibleLines].Time;
LineDuration := GetLineDuration(FDayView.Granularity);
{ Determine how much time is represented by one pixel. It is the }
{ amount of time represented by one line, divided by the height of }