[Qgis-developer] Map canvas zoom resets visibility of QgsRubberBand

Anatoliy Golubev darth.naihil at gmail.com
Wed Apr 1 23:24:42 PDT 2015


Hi devs!

I found another issue with QgsRubberBand which appear after fixing
#12392. See #12486 for details.

Im trying to fix this issue and have a questions about expected
behavior of QgsRubberBand.
When we create QgsRubberBand:
    QgsRubberBand *rb = new QgsRubberBand(mCanvas, 0);
constructor calls reset() and as a result visibility sets to false.

When we add valid geometry (not empty) calling addGeometry(geom,
layer) to empty rb - visibility should be set to true.

When we add point to empty rb without updating ( rb->addPoint(point,
false) ) visibility should not change and stay false.

When we add point to empty rb with updating ( rb->addPoint(point,
true) ) visibility should be set to true.

Is this correct behavior or we must manually call setVisible( true )
to show rubberband on map?


More information about the Qgis-developer mailing list