Skip to content

Commit

Permalink
wxGUI/digitizer: don't attempt to draw zero-length lines (#1989)
Browse files Browse the repository at this point in the history
Fixes bug #488.
  • Loading branch information
petrasovaa committed Nov 29, 2021
1 parent 54d46fe commit ec43358
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gui/wxpython/vdigit/wxdisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,14 @@ def _drawObject(self, robj):
for i in range(robj.npoints):
p = robj.point[i]
points.append(wx.Point(p.x, p.y))

if len(points) <= 1:
self.log.write(
_(
"WARNING: Zero-length line or boundary drawing skipped. "
"Use v.clean to remove it."
)
)
return
if robj.type == TYPE_AREA:
pdc.DrawPolygon(points)
else:
Expand Down

0 comments on commit ec43358

Please sign in to comment.