mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 23:59:12 +02:00
TAChart: Change fit parameter count in the setter of TFitSeries.FitEquation only when required. Issue #35178.
git-svn-id: trunk@60566 -
This commit is contained in:
parent
95c9d73fd4
commit
a178f5a031
@ -1630,7 +1630,7 @@ begin
|
||||
FPen.OnChange := @StyleChanged;
|
||||
FStep := DEF_FIT_STEP;
|
||||
FConfidenceLevel := 0.95;
|
||||
ParamCount := DEF_FIT_PARAM_COUNT; // Parabolic fit as default.
|
||||
SetParamCount(DEF_FIT_PARAM_COUNT); // Parabolic fit as default.
|
||||
InvalidateFitResults;
|
||||
end;
|
||||
|
||||
@ -2130,8 +2130,8 @@ procedure TFitSeries.SetFitEquation(AValue: TFitEquation);
|
||||
begin
|
||||
if FFitEquation = AValue then exit;
|
||||
FFitEquation := AValue;
|
||||
SetLength(
|
||||
FFitParams, IfThen(FFitEquation in [fePolynomial, feCustom], DEF_FIT_PARAM_COUNT, 2));
|
||||
if not (FFitEquation in [fePolynomial, feCustom]) then
|
||||
SetLength(FFitParams, 2);
|
||||
InvalidateFitResults;
|
||||
UpdateParentChart;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user