eric6/E5Graphics/E5ArrowItem.py

changeset 8257
28146736bbfc
parent 8218
7c09585bd960
child 8268
6b8128e0c9d1
--- a/eric6/E5Graphics/E5ArrowItem.py	Tue Apr 20 19:38:10 2021 +0200
+++ b/eric6/E5Graphics/E5ArrowItem.py	Tue Apr 20 19:47:39 2021 +0200
@@ -116,13 +116,10 @@
         @param option style options (QStyleOptionGraphicsItem)
         @param widget optional reference to the widget painted on (QWidget)
         """
-        if (
+        width = 2 if (
             (option.state & QStyle.StateFlag.State_Selected) ==
             QStyle.State(QStyle.StateFlag.State_Selected)
-        ):
-            width = 2
-        else:
-            width = 1
+        ) else 1
         
         # draw the line first
         line = QLineF(self._origin, self._end)

eric ide

mercurial