mini explorer didn't always sort

This commit is contained in:
Basile Burg 2018-10-07 14:47:25 +02:00
parent 23a7cc18fb
commit 1ab1dd3adf
1 changed files with 3 additions and 1 deletions

View File

@ -293,7 +293,7 @@ begin
lstFiles.OnCompare := @compareFileList;
fFileListSortDirection := sdAscending;
fFileListSortedColumnIndex:=-1;
fFileListSortedColumnIndex:=0;
fImages := TImageList.Create(self);
case GetIconScaledSize of
@ -724,6 +724,8 @@ procedure TCEMiniExplorerWidget.lstFilesFileAdded(Sender: TObject;
Item: TListItem);
begin
Item.ImageIndex:=0;
if lstFiles.SortColumn = -1 then
lstFIles.SortColumn := 0;
lstFiles.Sort;
end;