Skip to content
Permalink
Browse files

Replace an explicit delete with a ScopedPointer

  • Loading branch information
strk committed Jun 23, 2016
1 parent b07bae6 commit f473521a45af7d5c8952cb7c2b3a522eae4fb820
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/app/qgsmaptoolselect.cpp
@@ -26,6 +26,7 @@
#include <QMouseEvent>
#include <QRect>
#include <QColor>
#include <QScopedPointer>


QgsMapToolSelect::QgsMapToolSelect( QgsMapCanvas* canvas )
@@ -49,8 +50,7 @@ void QgsMapToolSelect::canvasReleaseEvent( QgsMapMouseEvent* e )
QRect selectRect( 0, 0, 0, 0 );
QgsMapToolSelectUtils::expandSelectRectangle( selectRect, vlayer, e->pos() );
QgsMapToolSelectUtils::setRubberBand( mCanvas, selectRect, &rubberBand );
QgsGeometry* selectGeom = rubberBand.asGeometry();
QgsMapToolSelectUtils::selectSingleFeature( mCanvas, selectGeom, e );
delete selectGeom;
QScopedPointer< QgsGeometry > selectGeom( rubberBand.asGeometry() );
QgsMapToolSelectUtils::selectSingleFeature( mCanvas, selectGeom.data(), e );
rubberBand.reset( QGis::Polygon );
}

0 comments on commit f473521

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