diff --git a/ide/patheditordlg.pas b/ide/patheditordlg.pas index 25a7d8f6b1..e7feda812b 100644 --- a/ide/patheditordlg.pas +++ b/ide/patheditordlg.pas @@ -310,13 +310,16 @@ begin TemplateForm := TGenericListSelectForm.Create(Nil); try TemplateForm.Caption := lisPathEditPathTemplates; + TemplateForm.ListBox.MultiSelect := true; // Let a user select only templates which are not in the list already. for i := 0 to FTemplateList.Count-1 do if PathListBox.Items.IndexOf(FTemplateList[i]) = -1 then TemplateForm.ListBox.Items.Add(FTemplateList[i]); if TemplateForm.ShowModal = mrOK then with TemplateForm.ListBox do - AddPath(Items[ItemIndex], TObject(1)); + for i := 0 to Items.Count - 1 do + if Selected[i] then + AddPath(Items[i], TObject(1)); finally TemplateForm.Free; end;