mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 07:16:30 +02:00
TAChart: Fix incorrect IsFewPoints() of TCubicSplineSeries.Spline (introduced by r60809 #0c695d9c39). Issue #35268, patch by Marcin Wiazowski.
git-svn-id: trunk@60819 -
This commit is contained in:
parent
43e2ae0cf6
commit
09a76c0d2d
@ -1271,7 +1271,7 @@ end;
|
||||
|
||||
function TCubicSplineSeries.TSpline.IsFewPoints: Boolean;
|
||||
begin
|
||||
Result := Length(FOwner.FX) < 2;
|
||||
Result := (FLastCacheIndex <= FFirstCacheIndex); // less than 2 points
|
||||
end;
|
||||
|
||||
function TCubicSplineSeries.TSpline.PrepareCoeffs(ASource: TCustomChartSource;
|
||||
@ -1296,7 +1296,7 @@ begin
|
||||
ASourceIndex += 1;
|
||||
end;
|
||||
FLastCacheIndex := ACacheIndex - 1;
|
||||
if FLastCacheIndex = FFirstCacheIndex then exit(false);
|
||||
if FLastCacheIndex < FFirstCacheIndex then exit(false); // No points
|
||||
if IsFewPoints then exit(true);
|
||||
ok := 0;
|
||||
n := ACacheIndex - FFirstCacheIndex;
|
||||
@ -1418,7 +1418,7 @@ begin
|
||||
if SplineType = cstHermiteMonotone then
|
||||
exit;
|
||||
|
||||
if not (FCachedExtent = EmptyExtent) then begin
|
||||
if (FCachedExtent <> EmptyExtent) then begin
|
||||
Result := FCachedExtent;
|
||||
exit;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user