mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-11 18:00:37 +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);
|
TemplateForm := TGenericListSelectForm.Create(Nil);
|
||||||
try
|
try
|
||||||
TemplateForm.Caption := lisPathEditPathTemplates;
|
TemplateForm.Caption := lisPathEditPathTemplates;
|
||||||
|
TemplateForm.ListBox.MultiSelect := true;
|
||||||
// Let a user select only templates which are not in the list already.
|
// Let a user select only templates which are not in the list already.
|
||||||
for i := 0 to FTemplateList.Count-1 do
|
for i := 0 to FTemplateList.Count-1 do
|
||||||
if PathListBox.Items.IndexOf(FTemplateList[i]) = -1 then
|
if PathListBox.Items.IndexOf(FTemplateList[i]) = -1 then
|
||||||
TemplateForm.ListBox.Items.Add(FTemplateList[i]);
|
TemplateForm.ListBox.Items.Add(FTemplateList[i]);
|
||||||
if TemplateForm.ShowModal = mrOK then
|
if TemplateForm.ShowModal = mrOK then
|
||||||
with TemplateForm.ListBox do
|
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
|
finally
|
||||||
TemplateForm.Free;
|
TemplateForm.Free;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user