fix in RectSelector
This commit is contained in:
@@ -139,10 +139,11 @@ class RectSelector:
|
|||||||
if x1-x0 > 0 and y1-y0 > 0:
|
if x1-x0 > 0 and y1-y0 > 0:
|
||||||
self.drag_rect = (x0, y0, x1, y1)
|
self.drag_rect = (x0, y0, x1, y1)
|
||||||
else:
|
else:
|
||||||
if self.drag_rect:
|
rect = self.drag_rect
|
||||||
self.callback(self.drag_rect)
|
|
||||||
self.drag_start = None
|
self.drag_start = None
|
||||||
self.drag_rect = None
|
self.drag_rect = None
|
||||||
|
if rect:
|
||||||
|
self.callback(rect)
|
||||||
def draw(self, vis):
|
def draw(self, vis):
|
||||||
if not self.drag_rect:
|
if not self.drag_rect:
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user