Skip to content

Commit 03b6e49

Browse files
committed
- fix bug
修复sam box提示时,点击鼠标右键造成的闪退问题。现在box提示模式下,点击鼠标右键为完成标注。
1 parent 658d896 commit 03b6e49

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ISAT/widgets/canvas.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,10 @@ def mousePressEvent(self, event: 'QtWidgets.QGraphicsSceneMouseEvent'):
810810

811811
elif self.draw_mode == DRAWMode.POLYGON:
812812
pass
813+
elif self.draw_mode == DRAWMode.SEGMENTANYTHING_BOX:
814+
try:
815+
self.finish_draw()
816+
except: pass
813817
else:
814818
raise ValueError('The draw mode named {} not supported.')
815819
if self.draw_mode == DRAWMode.SEGMENTANYTHING:

0 commit comments

Comments
 (0)