mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 15:48:03 +02:00
TAChart: Fix initialization/reset issue in TCustomAxisChartSource. Issue #35387, patch by Marcin Wiazowski.
git-svn-id: trunk@60997 -
This commit is contained in:
parent
5d5d933bd5
commit
dcb6dc0705
@ -31,7 +31,6 @@ type
|
||||
procedure SetYCount(AValue: Cardinal); override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
public
|
||||
function IsSorted: Boolean; override;
|
||||
|
||||
@ -42,6 +41,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
Math,
|
||||
TAChartUtils;
|
||||
|
||||
{ TCustomAxisChartSource }
|
||||
@ -50,14 +50,10 @@ constructor TCustomAxisChartSource.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FItem.Color := clTAColor;
|
||||
FItem.XList := nil;
|
||||
FItem.YList := nil;
|
||||
end;
|
||||
|
||||
destructor TCustomAxisChartSource.Destroy;
|
||||
begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TCustomAxisChartSource.GetCount: Integer;
|
||||
begin
|
||||
if AxisFrom = nil then
|
||||
@ -71,7 +67,12 @@ var
|
||||
v: Double;
|
||||
begin
|
||||
Result := @FItem;
|
||||
if AxisFrom = nil then exit;
|
||||
if AxisFrom = nil then begin
|
||||
FItem.Text := '';
|
||||
FItem.X := NaN;
|
||||
FItem.Y := NaN;
|
||||
exit;
|
||||
end;
|
||||
with AxisFrom.Value[AIndex] do begin
|
||||
FItem.Text := FText;
|
||||
v := FValue;
|
||||
|
Loading…
Reference in New Issue
Block a user