577 """ |
577 """ |
578 Private method to close the other tabs. |
578 Private method to close the other tabs. |
579 """ |
579 """ |
580 index = self.contextMenuIndex |
580 index = self.contextMenuIndex |
581 for i in list(range(self.count() - 1, index, -1)) + \ |
581 for i in list(range(self.count() - 1, index, -1)) + \ |
582 list(range(index - 1, -1, -1)): |
582 list(range(index - 1, -1, -1)): |
583 editor = self.widget(i).getEditor() |
583 editor = self.widget(i).getEditor() |
584 self.vm.closeEditorWindow(editor) |
584 self.vm.closeEditorWindow(editor) |
585 |
585 |
586 def __contextMenuCloseAll(self): |
586 def __contextMenuCloseAll(self): |
587 """ |
587 """ |
821 self.__inRemoveView = False |
821 self.__inRemoveView = False |
822 |
822 |
823 # if this was the last editor in this view, switch to the next, that |
823 # if this was the last editor in this view, switch to the next, that |
824 # still has open editors |
824 # still has open editors |
825 for i in list(range(self.tabWidgets.index(tw), -1, -1)) + \ |
825 for i in list(range(self.tabWidgets.index(tw), -1, -1)) + \ |
826 list(range(self.tabWidgets.index(tw) + 1, |
826 list(range(self.tabWidgets.index(tw) + 1, |
827 len(self.tabWidgets))): |
827 len(self.tabWidgets))): |
828 if self.tabWidgets[i].hasEditors(): |
828 if self.tabWidgets[i].hasEditors(): |
829 self.currentTabWidget.showIndicator(False) |
829 self.currentTabWidget.showIndicator(False) |
830 self.currentTabWidget = self.tabWidgets[i] |
830 self.currentTabWidget = self.tabWidgets[i] |
831 self.currentTabWidget.showIndicator(True) |
831 self.currentTabWidget.showIndicator(True) |
832 self.activeWindow().setFocus() |
832 self.activeWindow().setFocus() |