src/eric7/QScintilla/Editor.py

branch
eric7
changeset 10676
d1479a4f1426
parent 10674
8fc0af9c76dc
child 10678
665f1084ebf9
--- a/src/eric7/QScintilla/Editor.py	Mon Apr 08 16:21:46 2024 +0200
+++ b/src/eric7/QScintilla/Editor.py	Mon Apr 08 17:02:11 2024 +0200
@@ -8336,8 +8336,8 @@
         """
         Public slot to reload the editor contents checking its modification state first.
         """
-        if self.isModified():
-            ok = EricMessageBox.yesNo(
+        ok = (
+            EricMessageBox.yesNo(
                 self,
                 self.tr("Reload File"),
                 self.tr(
@@ -8347,8 +8347,9 @@
                 ),
                 icon=EricMessageBox.Warning,
             )
-        else:
-            ok = True
+            if self.isModified()
+            else True
+        )
         if ok:
             self.refresh()
 

eric ide

mercurial