Skip to content

Commit

Permalink
STY: appease pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nstelter-slac committed Apr 12, 2024
1 parent c7d7f14 commit 6d50787
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pydm/widgets/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def __init__(self, parent=None, init_channel=None):

self.penStyle = Qt.SolidLine
self.penWidth = 1

self._arrow_end_point_selection = False
self._arrow_start_point_selection = False
self._arrow_mid_point_selection = False
Expand Down Expand Up @@ -622,6 +622,7 @@ def _arrow_points(startpoint, endpoint, height, width):

return QPolygonF([left, endpoint, right])


class PyDMDrawingLine(PyDMDrawingLineBase, new_properties=_penRuleProperties):
"""
A widget with a line drawn in it.
Expand Down Expand Up @@ -755,7 +756,9 @@ def p2d(pt):
midpoint_x = (point1.x() + point2.x()) / 2
midpoint_y = (point1.y() + point2.y()) / 2
midpoint = QPointF(midpoint_x, midpoint_y)
points = self._arrow_points(point1, midpoint, self._arrow_size, self._arrow_size) # 6 = arbitrary arrow size
points = self._arrow_points(
point1, midpoint, self._arrow_size, self._arrow_size
) # 6 = arbitrary arrow size
painter.drawPolygon(points)

# Draw the arrows
Expand Down

0 comments on commit 6d50787

Please sign in to comment.