FIX: ffileassoc - empty file types add

This commit is contained in:
b4rr4cuda 2008-06-06 23:26:06 +00:00
commit 37ce3e1455

View file

@ -165,12 +165,15 @@ end;
procedure TfrmFileAssoc.btnAddNewTypeClick(Sender: TObject);
var
ExtAction : TExtAction;
s:string;
begin
s:=InputBox(Caption, 'Enter name:', ''); // TODO: Localize
if s='' then exit;
ExtAction := TExtAction.Create;
ExtAction.IsChanged := True;
with lbFileTypes do
begin
ExtAction.Name := InputBox(Caption, 'Enter name:', ''); // TODO: Localize
ExtAction.Name :=s;
Items.AddObject(ExtAction.Name, ExtAction);
// add file type to TExts object
Exts.AddItem(ExtAction);