fix the bug for the system crash, getting the focus DiagramView, if the
tabItem are deleted