Merged revision(s) 57272 #0a200582f4 from trunk:

TAChart: Fix DatapointCrosshairTool ignoring its CrosshairPen.Visible setting.
........

git-svn-id: branches/fixes_1_8@57297 -
This commit is contained in:
maxim 2018-02-13 21:23:56 +00:00
parent aa24def062
commit 0c9071a3b0

View File

@ -1969,8 +1969,11 @@ end;
procedure TDataPointCrosshairTool.DoDraw;
var
p: TPoint;
ps: TFPPenStyle;
begin
FChart.Drawer.Pen := CrosshairPen;
if not CrosshairPen.Visible then
ps := CrosshairPen.Style;
PrepareDrawingModePen(FChart.Drawer, CrosshairPen);
p := FChart.GraphToImage(Position);
if Shape in [ccsVertical, ccsCross] then
if Size < 0 then
@ -1982,6 +1985,8 @@ begin
FChart.DrawLineHoriz(FChart.Drawer, p.Y)
else
FChart.Drawer.Line(p - Point(Size, 0), p + Point(Size, 0));
if not CrosshairPen.Visible then
FChart.Drawer.SetPenParams(ps, CrosshairPen.Color);
inherited;
end;