mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-10-31 18:01:44 +01:00 
			
		
		
		
	ListFilterEdit: formatting
git-svn-id: trunk@34657 -
This commit is contained in:
		
							parent
							
								
									45beb7cd01
								
							
						
					
					
						commit
						b153740bb5
					
				| @ -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; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 juha
						juha