Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix artefacts with map tool select rectangle
- Loading branch information
Showing
with
4 additions
and
8 deletions.
-
+4
−8
src/app/qgsmaptoolselectrectangle.cpp
|
@@ -46,6 +46,7 @@ void QgsMapToolSelectFeatures::canvasPressEvent( QMouseEvent *e ) |
|
|
{ |
|
|
Q_UNUSED( e ); |
|
|
mSelectRect.setRect( 0, 0, 0, 0 ); |
|
|
delete mRubberBand; |
|
|
mRubberBand = new QgsRubberBand( mCanvas, QGis::Polygon ); |
|
|
mRubberBand->setFillColor( mFillColor ); |
|
|
mRubberBand->setBorderColor( mBorderColour ); |
|
@@ -72,13 +73,9 @@ void QgsMapToolSelectFeatures::canvasReleaseEvent( QMouseEvent *e ) |
|
|
QgsVectorLayer* vlayer = QgsMapToolSelectUtils::getCurrentVectorLayer( mCanvas ); |
|
|
if ( vlayer == NULL ) |
|
|
{ |
|
|
if ( mRubberBand ) |
|
|
{ |
|
|
mRubberBand->reset( QGis::Polygon ); |
|
|
delete mRubberBand; |
|
|
mRubberBand = 0; |
|
|
mDragging = false; |
|
|
} |
|
|
delete mRubberBand; |
|
|
mRubberBand = 0; |
|
|
mDragging = false; |
|
|
return; |
|
|
} |
|
|
|
|
@@ -117,7 +114,6 @@ void QgsMapToolSelectFeatures::canvasReleaseEvent( QMouseEvent *e ) |
|
|
|
|
|
delete selectGeom; |
|
|
|
|
|
mRubberBand->reset( QGis::Polygon ); |
|
|
delete mRubberBand; |
|
|
mRubberBand = 0; |
|
|
} |
|
|