mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 10:49:16 +02:00
cody: fixed clearing diagram
git-svn-id: trunk@40046 -
This commit is contained in:
parent
f4074a842f
commit
ce11068e10
@ -413,16 +413,18 @@ end;
|
|||||||
destructor TCustomCircleDiagramControl.Destroy;
|
destructor TCustomCircleDiagramControl.Destroy;
|
||||||
begin
|
begin
|
||||||
BeginUpdate; // disable updates
|
BeginUpdate; // disable updates
|
||||||
|
Clear;
|
||||||
FreeAndNil(fCategories);
|
FreeAndNil(fCategories);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomCircleDiagramControl.Clear;
|
procedure TCustomCircleDiagramControl.Clear;
|
||||||
begin
|
begin
|
||||||
|
if CategoryCount=0 then exit;
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
try
|
try
|
||||||
while CategoryCount>0 do
|
while CategoryCount>0 do
|
||||||
Categories[0].Free;
|
fCategories.Delete(CategoryCount-1);
|
||||||
finally
|
finally
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user