TAChart: Check UseReticule property only in TReticuleTool

git-svn-id: trunk@32077 -
This commit is contained in:
ask 2011-08-28 06:40:14 +00:00
parent be28a37a2a
commit 3d47dcc48a
2 changed files with 4 additions and 3 deletions

View File

@ -228,8 +228,6 @@ type
procedure UpdateMinXRange;
property Pointer: TSeriesPointer read FPointer write SetPointer;
property UseReticule: Boolean
read FUseReticule write SetUseReticule default false;
public
destructor Destroy; override;
public
@ -240,6 +238,8 @@ type
procedure MovePoint(var AIndex: Integer; const ANewPos: TPoint); override;
property MarkPositions: TLinearMarkPositions
read FMarkPositions write SetMarkPositions default lmpOutside;
property UseReticule: Boolean
read FUseReticule write SetUseReticule default false;
end;
implementation
@ -914,7 +914,7 @@ var
dist, i: Integer;
pt: TPoint;
begin
Result := UseReticule and (Count > 0);
Result := Count > 0;
AResults.FDist := MaxInt;
for i := 0 to Count - 1 do begin
// Since axis transformation may be non-linear, the distance should be

View File

@ -1072,6 +1072,7 @@ begin
p.FRadius := Trunc(Sqrt(MaxInt));
for s in CustomSeries(FChart) do
if
(not (s is TBasicPointSeries) or TBasicPointSeries(s).UseReticule) and
s.GetNearestPoint(p, cur) and PtInRect(FChart.ClipRect, cur.FImg) and
(cur.FDist < best.FDist)
then begin