bug when drawing a linestring with two consecutive, identical points
When I have a line string with two identical points in a row, and
they're not the first or the last point, qgis draws an extra line to the
upper left hand corner of the drawing space. (This line string, for
example, causes that to happen: 'LINESTRING(0 0, 0 1, 0 1, 1 1)')
In my domain, it makes perfect sense for two consecutive points to be
identical, and it seems like QGIS should draw it correctly.
It looks like the draw code in qgsvectorlayer loads the line string into
a QPolygonF before it gets drawn, so I think the bug might be there, but
I didn't track it down exactly. However, the attached patch does make it
go away. It works by modifying a point by an epsilon, if the previous
point was identical. I'm not sure if this is the best fix, but
deleting the point seemed bug-prone.