1.8.8 - Filelist sort order not reflected in browser
Posted: Sun May 25, 2025 11:43 pm
Expected Outcome
When a FILELIST is loaded from a text file. I expect the files to be sorted, as it appears in my filelist.txt.
This seems logical, as a filelist is a "curated" list. Similar to a sorted bookshelf, that may be sorted according to "theme", "topic", "author" etc. Users may want to sort their files according to their own use case. In which case using a filelist should support that.
The program should therefore respect the users choice of file order.
The "Sort by" value should not be affected or changed! There should instead be separate logic, to understand that, If a filelist is loaded, then the images would be indexed according to the line number in the text file. The program would then reflect this index order in the browser.
UNTIL (event change)
A) the FILELIST window is closed.
B) the user changes the "Sort by" type.
My filelist.txt:
Actual Outcome
The browser does not match the sort order in my filelist.txt. The files are sorted using the last selected sorting from the "Sort by" toolbar menu.
I generated 6 example PNG images, to explain my point. See FIG1.
I want the images sorted according to my own order, specified in the filelist.txt => 1, 3, 2, 5, 4, 6.
FIG 1 Suggestion for Bug Fix:
When a FILELIST is loaded from a text file. I expect the files to be sorted, as it appears in my filelist.txt.
This seems logical, as a filelist is a "curated" list. Similar to a sorted bookshelf, that may be sorted according to "theme", "topic", "author" etc. Users may want to sort their files according to their own use case. In which case using a filelist should support that.
The program should therefore respect the users choice of file order.
The "Sort by" value should not be affected or changed! There should instead be separate logic, to understand that, If a filelist is loaded, then the images would be indexed according to the line number in the text file. The program would then reflect this index order in the browser.
UNTIL (event change)
A) the FILELIST window is closed.
B) the user changes the "Sort by" type.
My filelist.txt:
Code: Select all
"/home/user/colors/1.png"
"/home/user/colors/3.png"
"/home/user/colors/2.png"
"/home/user/colors/5.png"
"/home/user/colors/4.png"
"/home/user/colors/6.png"
The browser does not match the sort order in my filelist.txt. The files are sorted using the last selected sorting from the "Sort by" toolbar menu.
I generated 6 example PNG images, to explain my point. See FIG1.
I want the images sorted according to my own order, specified in the filelist.txt => 1, 3, 2, 5, 4, 6.
FIG 1 Suggestion for Bug Fix:
-
Add Settings Option:
Add option in Settings to globally set whether to match the sort order from wtihin the filelist FILE.
FIG 2 -
Add Command-line Option:
If the settings option "Keep same order in filelist file" is not enabled (unchecked).
Provide another method. The user can pass a command-line option, when loading a filelist. For example "-keep-order".
FIG4Code: Select all
xnviewmp -filelist filelist.txt -keep-order