Fixed some issues related to non-existing flags. eric7

Sat, 26 Jun 2021 19:00:45 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 26 Jun 2021 19:00:45 +0200
branch
eric7
changeset 8441
371cbc55badd
parent 8440
f71f33c0d47a
child 8442
a23078cc9fa7

Fixed some issues related to non-existing flags.

eric7/QScintilla/Editor.py file | annotate | diff | comparison | revisions
eric7/UI/UserInterface.py file | annotate | diff | comparison | revisions
--- 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)
--- a/eric7/UI/UserInterface.py	Wed Jun 23 18:55:54 2021 +0200
+++ b/eric7/UI/UserInterface.py	Sat Jun 26 19:00:45 2021 +0200
@@ -7455,8 +7455,7 @@
         """
         if self.__startup:
             if Preferences.getGeometry("MainMaximized"):
-                self.setWindowState(
-                    Qt.WindowStates(Qt.WindowState.WindowMaximized))
+                self.setWindowState(Qt.WindowState.WindowMaximized)
             self.__startup = False
     
     ##########################################

eric ide

mercurial