698 """ |
698 """ |
699 with contextlib.suppress(KeyError): |
699 with contextlib.suppress(KeyError): |
700 editor = self.__editors[uid] |
700 editor = self.__editors[uid] |
701 idString = self.__idString(editor) |
701 idString = self.__idString(editor) |
702 |
702 |
|
703 editor.setCheckExternalModificationEnabled(False) |
|
704 |
703 self.sendJson( |
705 self.sendJson( |
704 "applyRefactoring", |
706 "applyRefactoring", |
705 { |
707 { |
706 "Uuid": uid, |
708 "Uuid": uid, |
707 }, |
709 }, |
708 idString=idString, |
710 idString=idString, |
709 ) |
711 ) |
710 |
|
711 del self.__editors[uid] |
|
712 |
712 |
713 def __cancelRefactoring(self, uid): |
713 def __cancelRefactoring(self, uid): |
714 """ |
714 """ |
715 Private method to cancel a given refactoring. |
715 Private method to cancel a given refactoring. |
716 |
716 |
744 self.tr("Apply Refactoring"), |
744 self.tr("Apply Refactoring"), |
745 self.tr( |
745 self.tr( |
746 "<p>The refactoring could not be applied.</p><p>Reason: {0}</p>" |
746 "<p>The refactoring could not be applied.</p><p>Reason: {0}</p>" |
747 ).format(result["ErrorString"]), |
747 ).format(result["ErrorString"]), |
748 ) |
748 ) |
|
749 else: |
|
750 with contextlib.suppress(KeyError): |
|
751 self.__editors[result["Uuid"]].reload() |
|
752 self.__editors[result["Uuid"]].setCheckExternalModificationEnabled(True) |
|
753 |
|
754 with contextlib.suppress(KeyError): |
|
755 del self.__editors[result["Uuid"]] |
749 |
756 |
750 ####################################################################### |
757 ####################################################################### |
751 ## Methods below handle the network connection |
758 ## Methods below handle the network connection |
752 ####################################################################### |
759 ####################################################################### |
753 |
760 |