Hi Nyall,

IIR the rubber band adds two points because the second one will be used to track the mouse moves.

Basically addPoint is synonym of add point to line. It shall not be used if you want to have single points.

Cheers,

Denis




On 28.08.2014 23:17, Nyall Dawson wrote:
Hi all,

I'm struggling to understand the rationale behind some logic in
QgsRubberBand::addPoint. At line 163
(https://github.com/qgis/QGIS/blob/master/src/gui/qgsrubberband.cpp#L163),
if a new geometry index is required then it is added and the specified
point added to this new geometry index.

That's fair enough, but the very next code block will then re-add that
same point to the new index. The result is that the first point will
always be added TWICE to the rubber band.

Is this deliberate? Or a bug in the code?

Nyall
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to