From d2efdbabc9b6445b9aeed8b061b047fad5f85d0f Mon Sep 17 00:00:00 2001 From: Maxim Ganetsky Date: Wed, 12 Jun 2024 23:32:38 +0000 Subject: [PATCH] Codetools: Fixed AV in "Project -> Show Used PPU Files" when sorting by double-clicking on last three columns. Patch by n7800, issue #40984. (cherry picked from commit 60e0038353b9c1bc15aa6833714f2563a63a61ed) Co-authored-by: Maxim Ganetsky --- components/codetools/ide/ppulistdlg.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/codetools/ide/ppulistdlg.pas b/components/codetools/ide/ppulistdlg.pas index 98c8d13612..832d32d7b2 100644 --- a/components/codetools/ide/ppulistdlg.pas +++ b/components/codetools/ide/ppulistdlg.pas @@ -135,7 +135,7 @@ type FIdleConnected: boolean; FSearchingItems: TAvlTree; // tree of TPPUDlgListItem sorted for TheUnitName FItems: TAvlTree; // tree of TPPUDlgListItem sorted for TheUnitName - FSort: array[1..3] of TPPUListSortRec; + FSort: array[1..6] of TPPUListSortRec; FDlgLinkedFiles: TAvlTree; // tree of TPPUDlgLinkedFile sorted for ID, file, flags procedure SetProject(const AValue: TLazProject); procedure SetIdleConnected(const AValue: boolean); @@ -265,6 +265,9 @@ begin FSort[1].Category:=plsOSize; FSort[2].Category:=plsName; FSort[3].Category:=plsPPUSize; + FSort[4].Category:=plsUsedByCount; + FSort[5].Category:=plsUsesCount; + FSort[6].Category:=plsPackage; PageControl1.PageIndex:=0;