fix in RectSelector

This commit is contained in:
Alexander Mordvintsev 2011-09-20 11:49:24 +00:00
parent 5ed65979c1
commit cd9d695f9d

View File

@ -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