modified: src/utils/area_selection.py

This commit is contained in:
vb
2025-11-09 21:26:07 +01:00
parent 650186cc2b
commit dea327e07a

View File

@@ -183,6 +183,13 @@ class AreaSelectionHandler:
def toggle_selection_inversion(self) -> bool:
"""Invert the current active selection."""
# Auto-complete polygon selection if user right-clicks after plotting points
if (self._selectionType == "polygon"
and self._selectionArea
and not self._selectionArea.is_active
and len(self._polygonPath) >= 3):
self._complete_polygon_selection()
if not self._selectionArea or not self._selectionArea.is_active:
return False
if not self._selectionArea.is_valid():