Disable coordinate caching on OHLC ds curves to avoid smearing
							parent
							
								
									1f11f7e4bf
								
							
						
					
					
						commit
						f2125187f4
					
				| 
						 | 
				
			
			@ -112,6 +112,7 @@ class Curve(FlowGraphic):
 | 
			
		|||
      updates don't trigger a full path redraw.
 | 
			
		||||
 | 
			
		||||
    '''
 | 
			
		||||
    cache_mode: int = QGraphicsItem.DeviceCoordinateCache
 | 
			
		||||
 | 
			
		||||
    def __init__(
 | 
			
		||||
        self,
 | 
			
		||||
| 
						 | 
				
			
			@ -178,7 +179,7 @@ class Curve(FlowGraphic):
 | 
			
		|||
        # only thing drawn is the "last" line segment which can
 | 
			
		||||
        # have a weird artifact where it won't be fully drawn to its
 | 
			
		||||
        # endpoint (something we saw on trade rate curves)
 | 
			
		||||
        self.setCacheMode(QGraphicsItem.DeviceCoordinateCache)
 | 
			
		||||
        self.setCacheMode(self.cache_mode)
 | 
			
		||||
 | 
			
		||||
        # XXX-NOTE-XXX: graphics caching.
 | 
			
		||||
        # see explanation for different caching modes:
 | 
			
		||||
| 
						 | 
				
			
			@ -382,6 +383,9 @@ class Curve(FlowGraphic):
 | 
			
		|||
# (via it's max / min) even when highly zoomed out.
 | 
			
		||||
class FlattenedOHLC(Curve):
 | 
			
		||||
 | 
			
		||||
    # avoids strange dragging/smearing artifacts when panning..
 | 
			
		||||
    cache_mode: int = QGraphicsItem.NoCache
 | 
			
		||||
 | 
			
		||||
    def draw_last_datum(
 | 
			
		||||
        self,
 | 
			
		||||
        path: QPainterPath,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue