fix review issues

This commit is contained in:
Peter Petrik 2018-09-14 09:33:30 +02:00
parent b70489bf06
commit dc774743e3
4 changed files with 5 additions and 4 deletions

View File

@ -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();

View File

@ -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 )
{

View File

@ -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

View File

@ -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 )