Fix marker-off-screen-placement for down arrows

fsp_feeds
Tyler Goodlet 2021-08-26 15:09:36 -04:00
parent 1ab23dcba3
commit 91fb451696
1 changed files with 9 additions and 2 deletions

View File

@ -172,11 +172,18 @@ class LevelMarker(QGraphicsPathItem):
# _, marker_right, _ = marker_right_points(line._chart) # _, marker_right, _ = marker_right_points(line._chart)
x = self.scene_x() x = self.scene_x()
if self.style == '>|': # short style, points "down-to" line
top_offset = self.h
bottom_offset = 0
else:
top_offset = 0
bottom_offset = self.h
if level > ymx: # pin to top of view if level > ymx: # pin to top of view
self.setPos( self.setPos(
QPointF( QPointF(
x, x,
self.h/3, top_offset + self.h/3,
) )
) )
@ -185,7 +192,7 @@ class LevelMarker(QGraphicsPathItem):
self.setPos( self.setPos(
QPointF( QPointF(
x, x,
view.height() - 4/3*self.h, view.height() - (bottom_offset + self.h/3),
) )
) )