Commit cd9d695f authored by Alexander Mordvintsev's avatar Alexander Mordvintsev

fix in RectSelector

parent 5ed65979
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment