Sfoglia il codice sorgente

Fix some more bugs with vertex highlighting

The highlight was not cleared properly under some conditions.
Michael Pitidis 13 anni fa
parent
commit
eda1c4ff86
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      canvas.py

+ 4 - 0
canvas.py

@@ -80,6 +80,8 @@ class Canvas(QWidget):
             self.deSelectShape()
 
     def unHighlight(self):
+        if self.hShape:
+            self.hShape.highlightClear()
         self.hVertex = self.hShape = None
 
     def selectedVertex(self):
@@ -146,6 +148,8 @@ class Canvas(QWidget):
             # check if we happen to be inside a shape.
             index = shape.nearestVertex(pos, self.epsilon)
             if index is not None:
+                if self.selectedVertex():
+                    self.hShape.highlightClear()
                 self.hVertex, self.hShape = index, shape
                 shape.highlightVertex(index, shape.MOVE_VERTEX)
                 self.overrideCursor(CURSOR_POINT)