I can reproduce this bug in XnViewMP, 0.75 x32 beta (Jun 11 2015) - plus there are other differences.
I used my own image, an original written from my Canon 350, but also replicated it with the image above. The Canon images are more sensitive to rotation as they are always 2x1 Chroma subsampled, which changes to 1x2 subsampling on lossless rotation.
- In Browser mode the rotate button does what looks like a lossless jpeg rotation, creating a file about the same size as the original. This happens either after a forced ctrl-S save or an automatic save when I leave the folder. This resets the Exif orientation flag to 1 (=horizontal).
- In View mode the rotate button followed by a save or a saveas causes the jpeg to be written with my default jpeg write settings. This retains the original Exif orientation flag.
- In View mode then lossless rotate followed by a save (ctrl-S) causes the jpeg to be rewritten with my default jpeg write settings. This resets the Exif orientation flag to 1 (=horizontal).
- In View mode then lossless rotate followed by an autosave (just close the view) causes the jpeg to be saved losslessly. This resets the Exif orientation flag to 1 (=horizontal).
Is seems to me that only the act of performing a lossless rotate resets the Exif orientation flag. I think
any process of rotation should reset the flag, and this should happen irrespective of the "ignore exif orientation" option. For example, I always have the orientation flag enabled, but occasionally I photograph documents looking vertically down and the orientation set by the camera is fairly random in relation to the document. Once I tell XnView what the image orientation is, I expect the orientation flag to show this.
The fact that the rotate buttons seem to behave differently in browser and view modes is worrying. My settings->Interface->Toolbar says the buttons are defined as "cmd_rotate270" and "cmd_rotate90" for both browse and view modes.
The fact that a lossless rotate followed immediately by a ctrl-S save changes the jpeg compression is perhaps another bug.