Close opened items when changing the item list.