mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:02:41 +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;
|
FPen.OnChange := @StyleChanged;
|
||||||
FStep := DEF_FIT_STEP;
|
FStep := DEF_FIT_STEP;
|
||||||
FConfidenceLevel := 0.95;
|
FConfidenceLevel := 0.95;
|
||||||
ParamCount := DEF_FIT_PARAM_COUNT; // Parabolic fit as default.
|
SetParamCount(DEF_FIT_PARAM_COUNT); // Parabolic fit as default.
|
||||||
InvalidateFitResults;
|
InvalidateFitResults;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2130,8 +2130,8 @@ procedure TFitSeries.SetFitEquation(AValue: TFitEquation);
|
|||||||
begin
|
begin
|
||||||
if FFitEquation = AValue then exit;
|
if FFitEquation = AValue then exit;
|
||||||
FFitEquation := AValue;
|
FFitEquation := AValue;
|
||||||
SetLength(
|
if not (FFitEquation in [fePolynomial, feCustom]) then
|
||||||
FFitParams, IfThen(FFitEquation in [fePolynomial, feCustom], DEF_FIT_PARAM_COUNT, 2));
|
SetLength(FFitParams, 2);
|
||||||
InvalidateFitResults;
|
InvalidateFitResults;
|
||||||
UpdateParentChart;
|
UpdateParentChart;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user