[Qgis-developer] Possible issue with QgsRubberBand
Denis Rouzaud
denis.rouzaud at gmail.com
Thu Aug 28 22:03:38 PDT 2014
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
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list