From bb4e2d9fb86eea43c5ac365e9e1d54fb8c1136cb Mon Sep 17 00:00:00 2001 From: wp Date: Wed, 22 Apr 2020 21:05:31 +0000 Subject: [PATCH] TAChart: Fix TLineSeries segment tracer crashing when only 1 y value exists. git-svn-id: trunk@63050 - --- components/tachart/taseries.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/tachart/taseries.pas b/components/tachart/taseries.pas index e35c3c6ee5..b90c32d412 100644 --- a/components/tachart/taseries.pas +++ b/components/tachart/taseries.pas @@ -812,6 +812,8 @@ begin PrepareGraphPoints(ext, true); dmin := AResults.FDist; for levelIndex := 0 to Source.YCount-1 do begin + if levelIndex > 0 then + UpdateGraphPoints(levelIndex, FStacked); ip1 := ParentChart.GraphToImage(FGraphPoints[0]); for pointIndex := 1 to FUpBound - FLoBound do begin ip2 := ParentChart.GraphToImage(FGraphPoints[pointIndex]); @@ -827,7 +829,6 @@ begin end; if not ((nptYList in AParams.FTargets) and (nptYList in ToolTargets)) then break; - UpdateGraphPoints(levelIndex, FStacked); end; if dmin < AResults.FDist then