added  MainWindow::cleaning_up_tabs_before_changing_current_tab()