ListFilterEdit: formatting

git-svn-id: trunk@34657 -
This commit is contained in:
juha 2012-01-08 10:43:36 +00:00
parent 45beb7cd01
commit b153740bb5

View File

@ -91,28 +91,6 @@ begin
fOriginalData.Assign(fFilteredListbox.Items);
end;
procedure TListFilterEdit.ApplyFilterCore;
var
i, j: Integer;
s: string;
clb: TCustomCheckListBox;
begin
clb:=Nil;
if fFilteredListbox is TCustomCheckListBox then
clb:=TCustomCheckListBox(fFilteredListbox);
fFilteredListbox.Clear;
fFilteredListbox.Items.BeginUpdate;
for i:=0 to fSortedData.Count-1 do begin
s:=fSortedData[i];
j:=fFilteredListbox.Items.AddObject(s, fSortedData.Objects[i]);
if Assigned(fSelectedPart) then
fFilteredListbox.Selected[i]:=fSelectedPart=fSortedData.Objects[i];
if Assigned(clb) and Assigned(OnCheckItem) then
clb.Checked[j]:=OnCheckItem(fSortedData.Objects[i]);
end;
fFilteredListbox.Items.EndUpdate;
end;
function TListFilterEdit.CompareFNs(AFilename1,AFilename2: string): integer;
begin
if SortData then
@ -150,6 +128,28 @@ begin
end;
end;
procedure TListFilterEdit.ApplyFilterCore;
var
i, j: Integer;
s: string;
clb: TCustomCheckListBox;
begin
clb:=Nil;
if fFilteredListbox is TCustomCheckListBox then
clb:=TCustomCheckListBox(fFilteredListbox);
fFilteredListbox.Clear;
fFilteredListbox.Items.BeginUpdate;
for i:=0 to fSortedData.Count-1 do begin
s:=fSortedData[i];
j:=fFilteredListbox.Items.AddObject(s, fSortedData.Objects[i]);
if Assigned(fSelectedPart) then
fFilteredListbox.Selected[i]:=fSelectedPart=fSortedData.Objects[i];
if Assigned(clb) and Assigned(OnCheckItem) then
clb.Checked[j]:=OnCheckItem(fSortedData.Objects[i]);
end;
fFilteredListbox.Items.EndUpdate;
end;
procedure TListFilterEdit.StoreSelection;
var
i: Integer;