QScintilla/MiniEditor.py

changeset 6190
5ecba04d31f2
parent 6119
18fb5d765f3a
child 6247
5c677a7f7d51
--- a/QScintilla/MiniEditor.py	Tue Mar 13 18:16:30 2018 +0100
+++ b/QScintilla/MiniEditor.py	Tue Mar 13 18:17:15 2018 +0100
@@ -2342,9 +2342,6 @@
         self.__textEdit.setText(txt)
         QApplication.restoreOverrideCursor()
         
-        self.__textEdit.setModified(modified)
-        self.setWindowModified(modified)
-        
         if filetype is None:
             self.filetype = ""
         else:
@@ -2434,6 +2431,18 @@
         
         return True
     
+    def setWindowModified(self, modified):
+        """
+        Public method to set the window modification status.
+        
+        @param modified flag indicating the modification status
+        @type bool
+        """
+        if "[*]" not in self.windowTitle():
+            self.setWindowTitle(self.tr("[*] - {0}")
+                                .format(self.tr("Mini Editor")))
+        super(MiniEditor, self).setWindowModified(modified)
+        
     def __setCurrentFile(self, fileName):
         """
         Private method to register the file name of the current file.

eric ide

mercurial