mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-24 12:11:34 +02:00
TAChart: Remove TBasicChartTool.Index function, since it duplicated TIndexedComponent.Index
git-svn-id: trunk@24428 -
This commit is contained in:
parent
fae59065d6
commit
d6d8f0ffd1
@ -102,7 +102,6 @@ type
|
||||
|
||||
procedure Activate; virtual;
|
||||
procedure Deactivate; virtual;
|
||||
function Index: Integer; virtual; abstract;
|
||||
end;
|
||||
|
||||
TChartToolEventId = (evidMouseDown, evidMouseMove, evidMouseUp);
|
||||
|
||||
@ -52,7 +52,6 @@ type
|
||||
procedure Dispatch(
|
||||
AChart: TChart; AEventId: TChartToolEventId; APoint: TPoint);
|
||||
function GetIndex: Integer; override;
|
||||
function Index: Integer; override;
|
||||
function IsActive: Boolean;
|
||||
procedure MouseDown(APoint: TPoint); virtual;
|
||||
procedure MouseMove(APoint: TPoint); virtual;
|
||||
@ -356,7 +355,10 @@ end;
|
||||
|
||||
function TChartTool.GetIndex: Integer;
|
||||
begin
|
||||
Result := Toolset.Tools.IndexOf(Self);
|
||||
if Toolset = nil then
|
||||
Result := -1
|
||||
else
|
||||
Result := Toolset.Tools.IndexOf(Self);
|
||||
end;
|
||||
|
||||
function TChartTool.GetParentComponent: TComponent;
|
||||
@ -369,14 +371,6 @@ begin
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
function TChartTool.Index: Integer;
|
||||
begin
|
||||
if FToolset = nil then
|
||||
Result := -1
|
||||
else
|
||||
Result := FToolset.Tools.IndexOf(Self);
|
||||
end;
|
||||
|
||||
function TChartTool.IsActive: Boolean;
|
||||
begin
|
||||
Result := (FChart <> nil) and (FChart.ActiveToolIndex = Index);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user