When doing a shutdown, the tabs need to be activated "properly" so that menus etc are updated. Otherwise if the user cancels, the program is left in a faulty state.
This patch fixes the focus problem that comes with 2 views. It also fixes this same problem when right clicking tab and selecting "Close All BUT This".
Edit: Forgot the situation where both views contain the same file. (Sourceforge won't let me delete my old attachment, so added new)
Edit2: Duplicate bug reports:
Fixed by Pekka Pöyry