After opening a file the tab widget will switch to the new tab