src/eric7/Graphics/UMLGraphicsView.py

branch
eric7
changeset 9502
6091145e189e
parent 9500
5771348ded12
child 9576
be9f8e7e42e0
--- a/src/eric7/Graphics/UMLGraphicsView.py	Wed Nov 09 15:15:39 2022 +0100
+++ b/src/eric7/Graphics/UMLGraphicsView.py	Wed Nov 09 15:17:05 2022 +0100
@@ -531,39 +531,33 @@
         amount = None
         for i, item in enumerate(items):
             rect = item.sceneBoundingRect()
-            if (
-                alignment == Qt.AlignmentFlag.AlignLeft
-                and (amount is None or rect.x() < amount)
+            if alignment == Qt.AlignmentFlag.AlignLeft and (
+                amount is None or rect.x() < amount
             ):
                 amount = rect.x()
                 index = i
-            elif (
-                alignment == Qt.AlignmentFlag.AlignRight
-                and (amount is None or rect.x() + rect.width() > amount)
+            elif alignment == Qt.AlignmentFlag.AlignRight and (
+                amount is None or rect.x() + rect.width() > amount
             ):
                 amount = rect.x() + rect.width()
                 index = i
-            elif (
-                alignment == Qt.AlignmentFlag.AlignHCenter
-                and (amount is None or rect.width() > amount)
+            elif alignment == Qt.AlignmentFlag.AlignHCenter and (
+                amount is None or rect.width() > amount
             ):
                 amount = rect.width()
                 index = i
-            elif (
-                alignment == Qt.AlignmentFlag.AlignTop
-                and (amount is None or rect.y() < amount)
+            elif alignment == Qt.AlignmentFlag.AlignTop and (
+                amount is None or rect.y() < amount
             ):
                 amount = rect.y()
                 index = i
-            elif (
-                alignment == Qt.AlignmentFlag.AlignBottom
-                and (amount is None or rect.y() + rect.height() > amount)
+            elif alignment == Qt.AlignmentFlag.AlignBottom and (
+                amount is None or rect.y() + rect.height() > amount
             ):
                 amount = rect.y() + rect.height()
                 index = i
-            elif (
-                alignment == Qt.AlignmentFlag.AlignVCenter
-                and (amount is None or rect.height() > amount)
+            elif alignment == Qt.AlignmentFlag.AlignVCenter and (
+                amount is None or rect.height() > amount
             ):
                 amount = rect.height()
                 index = i

eric ide

mercurial