mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 22:43:01 +00:00
IGFD: finally fix sorting
This commit is contained in:
parent
599244e1bc
commit
2fe315e5d7
3 changed files with 8 additions and 9 deletions
9
extern/igfd/ImGuiFileDialog.cpp
vendored
9
extern/igfd/ImGuiFileDialog.cpp
vendored
|
@ -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])
|
||||
|
|
2
extern/igfd/ImGuiFileDialog.h
vendored
2
extern/igfd/ImGuiFileDialog.h
vendored
|
@ -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
|
||||
|
|
6
extern/igfd/ImGuiFileDialogConfig.h
vendored
6
extern/igfd/ImGuiFileDialogConfig.h
vendored
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue