@@ -509,7 +509,7 @@ def set_cursor(self, cursor):
509509 def draw_rubberband (self , event , x0 , y0 , x1 , y1 ):
510510 # adapted from
511511 # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/189744
512- self . ctx = self .canvas .get_property ("window" ).cairo_create ()
512+ ctx = self .canvas .get_property ("window" ).cairo_create ()
513513
514514 # todo: instead of redrawing the entire figure, copy the part of
515515 # the figure that was covered by the previous rubberband rectangle
@@ -522,11 +522,11 @@ def draw_rubberband(self, event, x0, y0, x1, y1):
522522 h = abs (y1 - y0 )
523523 rect = [int (val ) for val in (min (x0 , x1 ), min (y0 , y1 ), w , h )]
524524
525- self . ctx .new_path ()
526- self . ctx .set_line_width (0.5 )
527- self . ctx .rectangle (rect [0 ], rect [1 ], rect [2 ], rect [3 ])
528- self . ctx .set_source_rgb (0 , 0 , 0 )
529- self . ctx .stroke ()
525+ ctx .new_path ()
526+ ctx .set_line_width (0.5 )
527+ ctx .rectangle (rect [0 ], rect [1 ], rect [2 ], rect [3 ])
528+ ctx .set_source_rgb (0 , 0 , 0 )
529+ ctx .stroke ()
530530
531531 def _update_buttons_checked (self ):
532532 for name , active in [("Pan" , "PAN" ), ("Zoom" , "ZOOM" )]:
0 commit comments