Skip to content

Commit

Permalink
fix review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik committed Sep 14, 2018
1 parent b70489b commit dc77474
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/gui/auto_generated/qgsidentifymenu.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsmaptoolselectionhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ QgsMapToolSelectionHandler::QgsMapToolSelectionHandler( QgsMapCanvas *canvas, Qg
QgsMapToolSelectionHandler::~QgsMapToolSelectionHandler()
{
cancel();
delete mIdentifyMenu;
}

void QgsMapToolSelectionHandler::canvasReleaseEvent( QgsMapMouseEvent *e )
Expand Down Expand Up @@ -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 )
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolselectionhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/gui/qgsidentifymenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit dc77474

Please sign in to comment.