You've already forked lazarus-ccr
iphonelazext: fix mem leak + improper grid cell setting
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1216 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -62,7 +62,7 @@ object newXibForm: TnewXibForm
|
|||||||
Left = 248
|
Left = 248
|
||||||
Height = 20
|
Height = 20
|
||||||
Top = 400
|
Top = 400
|
||||||
Width = 71
|
Width = 75
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Choose'
|
Caption = 'Choose'
|
||||||
ModalResult = 1
|
ModalResult = 1
|
||||||
|
@ -197,6 +197,7 @@ var
|
|||||||
i : Integer;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
for i:=0 to Items.Count-1 do TObject(Items[i]).Free;
|
for i:=0 to Items.Count-1 do TObject(Items[i]).Free;
|
||||||
|
Items.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TnewXibForm.AddTemplate(const AName,SourceXibFile,ADescr, IconFile:AnsiString);
|
procedure TnewXibForm.AddTemplate(const AName,SourceXibFile,ADescr, IconFile:AnsiString);
|
||||||
@ -206,7 +207,7 @@ end;
|
|||||||
|
|
||||||
function TnewXibForm.Execute(var FileName,SourceXibFile:AnsiString):Boolean;
|
function TnewXibForm.Execute(var FileName,SourceXibFile:AnsiString):Boolean;
|
||||||
var
|
var
|
||||||
w : integer;
|
w,h : integer;
|
||||||
begin
|
begin
|
||||||
if Items.Count=0 then begin
|
if Items.Count=0 then begin
|
||||||
Result:=False;
|
Result:=False;
|
||||||
@ -215,7 +216,9 @@ begin
|
|||||||
w:=DrawGrid1.ClientWidth div DrawGrid1.DefaultColWidth;
|
w:=DrawGrid1.ClientWidth div DrawGrid1.DefaultColWidth;
|
||||||
if w=0 then w:=1;
|
if w=0 then w:=1;
|
||||||
DrawGrid1.ColCount:=w;
|
DrawGrid1.ColCount:=w;
|
||||||
DrawGrid1.RowCount:=Items.Count div w;
|
h:=Items.Count div w;
|
||||||
|
if h=0 then h:=1;
|
||||||
|
DrawGrid1.RowCount:=h;
|
||||||
CustomName:=False;
|
CustomName:=False;
|
||||||
Result:=ShowModal = mrOK;
|
Result:=ShowModal = mrOK;
|
||||||
if Result then begin
|
if Result then begin
|
||||||
|
Reference in New Issue
Block a user