fix a bug to select a small bounding box

This commit is contained in:
Jaewoo Choi 2017-08-22 14:59:40 +09:00
parent f1ee71bf1c
commit 7b8519f50e

View File

@ -283,14 +283,12 @@ class Canvas(QWidget):
if self.selectedVertex(): # A vertex is marked for selection.
index, shape = self.hVertex, self.hShape
shape.highlightVertex(index, shape.MOVE_VERTEX)
self.selectShape(shape)
return
for shape in reversed(self.shapes):
if self.isVisible(shape) and shape.containsPoint(point):
shape.selected = True
self.selectedShape = shape
self.selectShape(shape)
self.calculateOffsets(shape, point)
self.setHiding()
self.selectionChanged.emit(True)
return
def calculateOffsets(self, shape, point):