TAChart: Remove TBasicChartTool.Index function, since it duplicated TIndexedComponent.Index

git-svn-id: trunk@24428 -
This commit is contained in:
ask 2010-04-05 09:51:27 +00:00
parent fae59065d6
commit d6d8f0ffd1
2 changed files with 4 additions and 11 deletions

View File

@ -102,7 +102,6 @@ type
procedure Activate; virtual;
procedure Deactivate; virtual;
function Index: Integer; virtual; abstract;
end;
TChartToolEventId = (evidMouseDown, evidMouseMove, evidMouseUp);

View File

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