Skip to content

Commit

Permalink
wxGUI: remove initial duplicate point when creating profile or measur…
Browse files Browse the repository at this point in the history
…ing distance (#2896)
  • Loading branch information
petrasovaa committed Mar 21, 2023
1 parent 874c086 commit 3d91a65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gui/wxpython/mapwin/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ def _addPoint(self, x, y):
:param x,y: east north coordinates
"""
# avoid duplicating point in the beginning
begin = self._mapWindow.mouse["begin"]
end = self._mapWindow.mouse["end"]
if begin == end:
return
# add new point and calculate distance
item = self._registeredGraphics.GetItem(0)
coords = item.GetCoords() + [[x, y]]
Expand Down

0 comments on commit 3d91a65

Please sign in to comment.