qgis/QGIS — pull request #972 by leyan (2013-10-24 14:30:09+00:00)
Title: Replace manual square by creation of a ICON_FULL_BOX icon type for rubber band

I encountered a bug where the rubber band marker created by QgsMapToolNodeTool::createRubberBandMarker does not deal correctly with the project CRS. When the project CRS is geographic while the layer CRS is projected (and OTF enabled), the marker seems to confuse the size and the whole screen is drawn red because it is covered by a gigantic marker.

While trying to fix this bug, I realized the marker is drawn manually inside the function, while it could easily use the QgsRubberBand. To do that, I added a ICON_FULL_BOX icon type, which drawns a full square of the specified size and color. The end result should be identical to the current situation, without the bug and with a slightly cleaner code.