IGFD: finally fix sorting

This commit is contained in:
tildearrow 2023-06-10 14:37:08 -05:00
parent 599244e1bc
commit 2fe315e5d7
3 changed files with 8 additions and 9 deletions

View file

@ -1189,10 +1189,9 @@ namespace IGFD
IGFD::FileManager::FileManager()
{
puFsRoot = std::string(1u, PATH_SEP);
puSortingDirection[0]=false;
puSortingDirection[1]=false;
puSortingDirection[2]=false;
puSortingDirection[3]=false;
for (int i=0; i<5; i++) {
puSortingDirection[i]=true;
}
}
void IGFD::FileManager::OpenCurrentPath(const FileDialogInternal& vFileDialogInternal)
@ -1233,7 +1232,7 @@ namespace IGFD
logV("IGFD: sorting by name");
if (vCanChangeOrder && puSortingField == vSortingField) {
//printf("Change the sorting\n");
puSortingDirection[0] = true;//!puSortingDirection[0];
puSortingDirection[0] = !puSortingDirection[0];
}
if (puSortingDirection[0])

View file

@ -869,7 +869,7 @@ namespace IGFD
std::string puHeaderFileDate; // detail view name of column date + time
#ifdef USE_THUMBNAILS
std::string puHeaderFileThumbnails; // detail view name of column thumbnails
bool puSortingDirection[5] = { true, true, true, true, true }; // detail view // true => Descending, false => Ascending
bool puSortingDirection[5]; // detail view // true => Descending, false => Ascending
#else
bool puSortingDirection[4]; // detail view // true => Descending, false => Ascending
#endif

View file

@ -80,9 +80,9 @@
//#define DateTimeFormat "%Y/%m/%d %i:%M%p"
// theses icons will appear in table headers
//#define USE_CUSTOM_SORTING_ICON
//#define tableHeaderAscendingIcon "A|"
//#define tableHeaderDescendingIcon "D|"
#define USE_CUSTOM_SORTING_ICON
#define tableHeaderAscendingIcon ICON_FA_CHEVRON_UP " "
#define tableHeaderDescendingIcon ICON_FA_CHEVRON_DOWN " "
//#define tableHeaderFileNameString " File name"
//#define tableHeaderFileTypeString " Type"
//#define tableHeaderFileSizeString " Size"