def closeEvent(self, event):
        self.tabController.mergeTab(self, self.tabController.count())
        event.accept()
On close event dock the sheet back to the spreadsheet window
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/packages/spreadsheet/spreadsheet_tab.py/StandardTabDockWidget.closeEvent