mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 04:49:29 +02:00
IDE: fixed memleak when showing the align components dialog
git-svn-id: trunk@11346 -
This commit is contained in:
parent
ba609c5a5d
commit
2faaf28d30
@ -55,12 +55,16 @@ function ShowAlignComponentsDialog(var HorizAlignID, VertAlignID: integer
|
|||||||
var AlignComponentsDialog: TAlignComponentsDialog;
|
var AlignComponentsDialog: TAlignComponentsDialog;
|
||||||
begin
|
begin
|
||||||
AlignComponentsDialog:=TAlignComponentsDialog.Create(nil);
|
AlignComponentsDialog:=TAlignComponentsDialog.Create(nil);
|
||||||
with AlignComponentsDialog do begin
|
try
|
||||||
HorizontalRadioGroup.ItemIndex:=0;
|
with AlignComponentsDialog do begin
|
||||||
VerticalRadioGroup.ItemIndex:=0;
|
HorizontalRadioGroup.ItemIndex:=0;
|
||||||
Result:=ShowModal;
|
VerticalRadioGroup.ItemIndex:=0;
|
||||||
HorizAlignID:=AlignComponentsDialog.HorizontalRadioGroup.ItemIndex;
|
Result:=ShowModal;
|
||||||
VertAlignID:=AlignComponentsDialog.VerticalRadioGroup.ItemIndex;
|
HorizAlignID:=AlignComponentsDialog.HorizontalRadioGroup.ItemIndex;
|
||||||
|
VertAlignID:=AlignComponentsDialog.VerticalRadioGroup.ItemIndex;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
AlignComponentsDialog.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user