Fixed the expanding and closing behavior of the structure view.