Made the reopen with encoding editor context menu react upon file modification status.

Tue, 18 Mar 2014 18:51:09 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 18 Mar 2014 18:51:09 +0100
changeset 3395
7e923cf9918f
parent 3394
d1d4d79b4f11
child 3396
5320ecd70fdb

Made the reopen with encoding editor context menu react upon file modification status.

QScintilla/Editor.py file | annotate | diff | comparison | revisions
diff -r d1d4d79b4f11 -r 7e923cf9918f QScintilla/Editor.py
--- a/QScintilla/Editor.py	Mon Mar 17 19:58:45 2014 +0100
+++ b/QScintilla/Editor.py	Tue Mar 18 18:51:09 2014 +0100
@@ -4700,7 +4700,8 @@
         """
         Private slot handling the aboutToShow signal of the context menu.
         """
-        # TODO: set enable status of self.menuActs["Reopen"]
+        self.menuActs["Reopen"].setEnabled(
+            not self.isModified() and bool(self.fileName))
         self.menuActs["Save"].setEnabled(self.isModified())
         self.menuActs["Undo"].setEnabled(self.isUndoAvailable())
         self.menuActs["Redo"].setEnabled(self.isRedoAvailable())

eric ide

mercurial