and fix the opposite problem when going to object mode from the menu. (commit 27747 by Brecht from render25 branch)