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