617 @param editor editor window to be changed |
617 @param editor editor window to be changed |
618 @type Editor |
618 @type Editor |
619 @param newName new name to be shown |
619 @param newName new name to be shown |
620 @type str |
620 @type str |
621 """ |
621 """ |
622 if newName: |
622 if newName and editor in self.editors: |
623 currentRow = self.viewlist.currentRow() |
623 currentRow = self.viewlist.currentRow() |
624 index = self.editors.index(editor) |
624 index = self.editors.index(editor) |
625 txt = os.path.basename(newName) |
625 txt = os.path.basename(newName) |
626 if editor.checkReadOnly(): |
626 if editor.checkReadOnly(): |
627 txt = self.tr("{0} (ro)").format(txt) |
627 txt = self.tr("{0} (ro)").format(txt) |