Fix marker-off-screen-placement for down arrows
							parent
							
								
									1ab23dcba3
								
							
						
					
					
						commit
						91fb451696
					
				|  | @ -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), | ||||||
|                 ) |                 ) | ||||||
|             ) |             ) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue