def clearPreviewTabs(self):
        tab_idx = self.tabBar.count()-1
        while self.tabBar.count() > 1:
            idx = self.tab_to_stack_idx[tab_idx]
            if isinstance(self.stack.widget(idx), QMashupViewTab):
                self.tabBar.removeTab(tab_idx)
                if idx >= 0:
                    self.stack.removeWidget(self.stack.widget(idx))
            tab_idx -= 1
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/mashups/mashup_view.py/QMashupView.clearPreviewTabs/original