mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-07 22:34:41 +01:00
TAChart: Deactivate cross-hair tool after call to Hide
git-svn-id: trunk@32025 -
This commit is contained in:
parent
9835faabb1
commit
1f845378e0
@ -381,6 +381,7 @@ type
|
|||||||
FShape: TChartCrosshairShape;
|
FShape: TChartCrosshairShape;
|
||||||
FSize: Integer;
|
FSize: Integer;
|
||||||
procedure DoDraw;
|
procedure DoDraw;
|
||||||
|
procedure DoHide;
|
||||||
procedure SetCrosshairPen(AValue: TChartPen);
|
procedure SetCrosshairPen(AValue: TChartPen);
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
@ -1461,6 +1462,20 @@ begin
|
|||||||
OnDraw(Self);
|
OnDraw(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TDataPointCrosshairTool.DoHide;
|
||||||
|
begin
|
||||||
|
if FSeries = nil then exit;
|
||||||
|
FSeries := nil;
|
||||||
|
case EffectiveDrawingMode of
|
||||||
|
tdmXor: begin
|
||||||
|
PrepareXorPen(FChart.Canvas);
|
||||||
|
DoDraw;
|
||||||
|
end;
|
||||||
|
tdmNormal:
|
||||||
|
FChart.StyleChanged(Self);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TDataPointCrosshairTool.Draw(AChart: TChart; ADrawer: IChartDrawer);
|
procedure TDataPointCrosshairTool.Draw(AChart: TChart; ADrawer: IChartDrawer);
|
||||||
begin
|
begin
|
||||||
if FSeries = nil then exit;
|
if FSeries = nil then exit;
|
||||||
@ -1476,16 +1491,8 @@ end;
|
|||||||
|
|
||||||
procedure TDataPointCrosshairTool.Hide;
|
procedure TDataPointCrosshairTool.Hide;
|
||||||
begin
|
begin
|
||||||
if FSeries = nil then exit;
|
DoHide;
|
||||||
FSeries := nil;
|
FChart := nil;
|
||||||
case EffectiveDrawingMode of
|
|
||||||
tdmXor: begin
|
|
||||||
PrepareXorPen(FChart.Canvas);
|
|
||||||
DoDraw;
|
|
||||||
end;
|
|
||||||
tdmNormal:
|
|
||||||
FChart.StyleChanged(Self);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDataPointCrosshairTool.KeyDown(APoint: TPoint);
|
procedure TDataPointCrosshairTool.KeyDown(APoint: TPoint);
|
||||||
@ -1495,7 +1502,7 @@ end;
|
|||||||
|
|
||||||
procedure TDataPointCrosshairTool.MouseMove(APoint: TPoint);
|
procedure TDataPointCrosshairTool.MouseMove(APoint: TPoint);
|
||||||
begin
|
begin
|
||||||
Hide;
|
DoHide;
|
||||||
FindNearestPoint(APoint);
|
FindNearestPoint(APoint);
|
||||||
if FSeries = nil then exit;
|
if FSeries = nil then exit;
|
||||||
FPosition := FNearestGraphPoint;
|
FPosition := FNearestGraphPoint;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user