mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 20:59:45 +02:00
IDE: fix returning the user selection from View Unit dialog
git-svn-id: trunk@31542 -
This commit is contained in:
parent
1a2fe11014
commit
6867ccdde7
@ -92,6 +92,7 @@ function ShowViewUnitsDlg(Entries: TStringList; AllowMultiSelect: boolean;
|
||||
var
|
||||
ViewUnitDialog: TViewUnitDialog;
|
||||
UEntry: TViewUnitsEntry;
|
||||
TmpList: TStringList;
|
||||
i: integer;
|
||||
begin
|
||||
ViewUnitDialog:=TViewUnitDialog.Create(nil);
|
||||
@ -117,9 +118,18 @@ begin
|
||||
Result:=ShowModal;
|
||||
if Result=mrOk then begin
|
||||
// Return new selections from the dialog
|
||||
for i:=0 to Entries.Count-1 do begin
|
||||
UEntry:=TViewUnitsEntry(Entries.Objects[i]);
|
||||
UEntry.Selected:=FilterEdit.SelectionList.IndexOf(UEntry.Name)>-1;
|
||||
TmpList:=TStringList.Create;
|
||||
try
|
||||
for i:=0 to ListBox.Count-1 do begin
|
||||
if ListBox.Selected[i] then
|
||||
TmpList.Add(ListBox.Items[i]);
|
||||
end;
|
||||
for i:=0 to Entries.Count-1 do begin
|
||||
UEntry:=TViewUnitsEntry(Entries.Objects[i]);
|
||||
UEntry.Selected:=TmpList.IndexOf(UEntry.Name)>-1;
|
||||
end;
|
||||
finally
|
||||
TmpList.Free;
|
||||
end;
|
||||
CheckMultiSelect := mniMultiselect.Checked;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user