OS: Windows 11 - 64-bit
When selecting a range of files in the Browser using Shift+Click, the Viewer displays a file different from the expected endpoint of the selection.
Effect: Incorrect file is displayed in the Viewer after range selection.
To reproduce:
1. Open XnView MP with the Viewer active.
2. In the Browser, click on a file (let's call this file A).
3. File A is correctly displayed in the Viewer.
4. Shift+Click on another file (let's call this file B) to select a range from A to B.
5. The file displayed in the Viewer is not B, but a different one.
Actual behaviour (bug): Viewer displays a file other than B.

Expected behaviour: The file at the endpoint of the selection (B) should be displayed in the Viewer.