diff --git a/libs/canvas.py b/libs/canvas.py index 4a8d9586..8b7dc479 100644 --- a/libs/canvas.py +++ b/libs/canvas.py @@ -216,7 +216,8 @@ class Canvas(QWidget): # - Highlight vertex # Update shape/vertex fill and tooltip value accordingly. self.setToolTip("Image") - for shape in reversed([s for s in self.shapes if self.isVisible(s)]): + priority_list = self.shapes + ([self.selected_shape] if self.selected_shape else []) + for shape in reversed([s for s in priority_list 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.nearest_vertex(pos, self.epsilon)