mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 04:59:20 +01:00
IDE/PathEditorDialog: Allow selecting multiple templates from the list at once
This commit is contained in:
parent
9eaed334bc
commit
b63380546a
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user