fix in RectSelector

pull/13383/head
Alexander Mordvintsev 14 years ago
parent 5ed65979c1
commit cd9d695f9d
  1. 5
      samples/python2/common.py

@ -139,10 +139,11 @@ class RectSelector:
if x1-x0 > 0 and y1-y0 > 0:
self.drag_rect = (x0, y0, x1, y1)
else:
if self.drag_rect:
self.callback(self.drag_rect)
rect = self.drag_rect
self.drag_start = None
self.drag_rect = None
if rect:
self.callback(rect)
def draw(self, vis):
if not self.drag_rect:
return

Loading…
Cancel
Save