Let's say I have two subfolders, with the same parent folder, called Chapter 1 and Chapter 2. I'm in View mode, and I've just reached the last file of Chapter 1. When I go to the next file (via the UI button, keyboard shortcut or whatever), the View jumps to the first file of Chapter 2. I would like an option to enable this behaviour, as an alternative to the View > Misc > "Loop on the file list" setting.
I'd suggest that you replace that setting with a new "box" of settings looking like this:
Next file after last in folder:
- Loop on the file list
- Jump to next subfolder in parent folder
- Allow navigating vertically:
- Max levels up [ 1 ▾] and down [ 0 ▾]
- Sort folders [ last ▾]
The user might also want to set a limit on how many levels up are allowed to change in the file path. For example, let's say I've just opened a file in /Pictures/Photos/2025/. I reach the last file in 2025 and want to see 2026, so I click next file and it goes to /Pictures/Photos/2026/. Then, I reach the last file and click next again, and suddenly I'm in /Pictures/Private/DO NOT ENTER/. Whoops!
Letting the user set how many levels of parent folders are allowed to change would allow them to set 1, and then only the year would change. You could also just have this set to 0 each time XnView MP is launched, and then give the user a dialog asking to increase the number of levels by 1 if they reach the last file in the current scope.
However, there's something to consider. I have my XnView MP set to sort files by last modified as it is ideal for my purposes, but I want this folder linking behaviour to sort folders by name. That is, if I add a file to Chapter 1 or do anything else that changes the last modified date of the folder, I don't want it to suddenly place itself after Chapter 2 instead of before. So, I think there might need to be an extra setting just for choosing the sorting mode of this feature, independently of sorting files in the file list. But sorting folders by name by default would probably suit almost all users.
I could draw up some diagrams to explain further if needed, but otherwise, I hope this seems useful enough to add.