Parcourir la source

Relative highlighting.

Jonne Engelberts il y a 6 ans
Parent
commit
11c0fc8f47
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      labelme/widgets/canvas.py

+ 2 - 2
labelme/widgets/canvas.py

@@ -231,8 +231,8 @@ class Canvas(QtWidgets.QWidget):
         for shape in reversed([s for s in self.shapes if self.isVisible(s)]):
             # Look for a nearby vertex to highlight. If that fails,
             # check if we happen to be inside a shape.
-            index = shape.nearestVertex(pos, self.epsilon)
-            index_edge = shape.nearestEdge(pos, self.epsilon)
+            index = shape.nearestVertex(pos, self.epsilon / self.scale)
+            index_edge = shape.nearestEdge(pos, self.epsilon / self.scale)
             if index is not None:
                 if self.selectedVertex():
                     self.hShape.highlightClear()