fix in RectSelector
This commit is contained in:
parent
5ed65979c1
commit
cd9d695f9d
@ -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…
x
Reference in New Issue
Block a user