Skip to content

Commit 3d91a65

Browse files
authored
wxGUI: remove initial duplicate point when creating profile or measuring distance (#2896)
1 parent 874c086 commit 3d91a65

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gui/wxpython/mapwin/analysis.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ def _addPoint(self, x, y):
7070
7171
:param x,y: east north coordinates
7272
"""
73+
# avoid duplicating point in the beginning
74+
begin = self._mapWindow.mouse["begin"]
75+
end = self._mapWindow.mouse["end"]
76+
if begin == end:
77+
return
7378
# add new point and calculate distance
7479
item = self._registeredGraphics.GetItem(0)
7580
coords = item.GetCoords() + [[x, y]]

0 commit comments

Comments
 (0)