Skip to content
Permalink
Browse files

Fix artefacts with map tool select rectangle

  • Loading branch information
m-kuhn committed May 27, 2015
1 parent 2bd39e2 commit 9e59b6e4dbf5a616408c994f168b647254516779
Showing with 4 additions and 8 deletions.
  1. +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;
}

0 comments on commit 9e59b6e

Please sign in to comment.
You can’t perform that action at this time.