mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 00:59:31 +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;
|
||||
begin
|
||||
AlignComponentsDialog:=TAlignComponentsDialog.Create(nil);
|
||||
with AlignComponentsDialog do begin
|
||||
HorizontalRadioGroup.ItemIndex:=0;
|
||||
VerticalRadioGroup.ItemIndex:=0;
|
||||
Result:=ShowModal;
|
||||
HorizAlignID:=AlignComponentsDialog.HorizontalRadioGroup.ItemIndex;
|
||||
VertAlignID:=AlignComponentsDialog.VerticalRadioGroup.ItemIndex;
|
||||
try
|
||||
with AlignComponentsDialog do begin
|
||||
HorizontalRadioGroup.ItemIndex:=0;
|
||||
VerticalRadioGroup.ItemIndex:=0;
|
||||
Result:=ShowModal;
|
||||
HorizAlignID:=AlignComponentsDialog.HorizontalRadioGroup.ItemIndex;
|
||||
VertAlignID:=AlignComponentsDialog.VerticalRadioGroup.ItemIndex;
|
||||
end;
|
||||
finally
|
||||
AlignComponentsDialog.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user