Skip to content

Commit

Permalink
Replace an explicit delete with a ScopedPointer
Browse files Browse the repository at this point in the history
  • Loading branch information
strk committed Jun 23, 2016
1 parent b07bae6 commit f473521
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/qgsmaptoolselect.cpp
Expand Up @@ -26,6 +26,7 @@
#include <QMouseEvent>
#include <QRect>
#include <QColor>
#include <QScopedPointer>


QgsMapToolSelect::QgsMapToolSelect( QgsMapCanvas* canvas )
Expand All @@ -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.