eric7/QScintilla/Editor.py

branch
eric7
changeset 8441
371cbc55badd
parent 8439
982a9383c57a
child 8471
e1f001ffdce4
--- a/eric7/QScintilla/Editor.py	Wed Jun 23 18:55:54 2021 +0200
+++ b/eric7/QScintilla/Editor.py	Sat Jun 26 19:00:45 2021 +0200
@@ -7116,13 +7116,11 @@
             evt.type() == QEvent.Type.WindowStateChange and
             bool(self.fileName)
         ):
-            if (
-                self.windowState() == Qt.WindowStates(
-                    Qt.WindowState.WindowMinimized)
-            ):
-                cap = os.path.basename(self.fileName)
-            else:
-                cap = self.fileName
+            cap = (
+                os.path.basename(self.fileName)
+                if self.windowState() == Qt.WindowState.WindowMinimized else
+                self.fileName
+            )
             if self.isReadOnly():
                 cap = self.tr("{0} (ro)").format(cap)
             self.setWindowTitle(cap)

eric ide

mercurial