Fix potential crash on menu item click
Clear 3d selection/hilight on edit mode change
Update 3d mode line data if index changed