mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-29 12:47:38 +01:00
LCL/ShellListView: Avoid duplicate storage of file size in TShellListItem.FileInfo.Size and in TShellListItem.Data --> make ListItem.Data available for user data.
This commit is contained in:
parent
59e3b49432
commit
b68a60fbf5
@ -1907,9 +1907,7 @@ begin
|
||||
if not FileItem.IsFolder then
|
||||
begin
|
||||
// Second column - Size, but not for folders
|
||||
// The raw size in bytes is stored in the data part of the item
|
||||
CurFileSize := FileItem.FFileInfo.Size; // in Bytes. (We already know this, so no need for FileSize(CurFilePath))
|
||||
NewItem.Data := Pointer(PtrInt(CurFileSize));
|
||||
NewItem.SubItems.Add(FileSizeToStr(CurFileSize));
|
||||
// Third column - Type, but not folders
|
||||
NewItem.SubItems.Add(ExtractFileExt(CurFileName));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user