Skip to content
Permalink
Browse files

fix review issues

  • Loading branch information
PeterPetrik committed Sep 14, 2018
1 parent b70489b commit dc774743e304c52171ed770ad698500cc8635a6c
@@ -64,7 +64,7 @@ define if the menu executed can return multiple results (e.g. all results or all

void setExecWithSingleResult( bool execWithSingleResult );
%Docstring
define if the menu will be shown with a single idetify result
define if the menu will be shown with a single identify result
%End
bool execWithSingleResult();

@@ -109,7 +109,6 @@ QgsMapToolSelectionHandler::QgsMapToolSelectionHandler( QgsMapCanvas *canvas, Qg
QgsMapToolSelectionHandler::~QgsMapToolSelectionHandler()
{
cancel();
delete mIdentifyMenu;
}

void QgsMapToolSelectionHandler::canvasReleaseEvent( QgsMapMouseEvent *e )
@@ -256,7 +255,8 @@ void QgsMapToolSelectionHandler::selectPolygonPressEvent( QgsMapMouseEvent *e )
double x = mapPoint.x(), y = mapPoint.y();
double sr = QgsMapTool::searchRadiusMU( mCanvas );

for ( auto layer : mCanvas->layers() )
const QList<QgsMapLayer*> layers = mCanvas->layers();
for ( auto layer : layers )
{
if ( layer->type() == QgsMapLayer::VectorLayer )
{
@@ -199,7 +199,7 @@ class QgsMapToolSelectionHandler : public QObject
QColor mStrokeColor = QColor( 254, 58, 29, 100 );

//! Shows features to select polygon from existing features
QgsIdentifyMenu *mIdentifyMenu = nullptr;
QgsIdentifyMenu *mIdentifyMenu = nullptr; // owned by canvas
};

#endif
@@ -26,6 +26,7 @@
#include "qgssettings.h"
#include "qgsgui.h"

//TODO 4.0 add explicitely qobject parent to constructor
QgsIdentifyMenu::QgsIdentifyMenu( QgsMapCanvas *canvas )
: QMenu( canvas )
, mCanvas( canvas )

0 comments on commit dc77474

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