Skip to content

Commit dc77474

Browse files
committedSep 14, 2018
fix review issues
1 parent b70489b commit dc77474

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed
 

‎python/gui/auto_generated/qgsidentifymenu.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ define if the menu executed can return multiple results (e.g. all results or all
6464

6565
void setExecWithSingleResult( bool execWithSingleResult );
6666
%Docstring
67-
define if the menu will be shown with a single idetify result
67+
define if the menu will be shown with a single identify result
6868
%End
6969
bool execWithSingleResult();
7070

‎src/app/qgsmaptoolselectionhandler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ QgsMapToolSelectionHandler::QgsMapToolSelectionHandler( QgsMapCanvas *canvas, Qg
109109
QgsMapToolSelectionHandler::~QgsMapToolSelectionHandler()
110110
{
111111
cancel();
112-
delete mIdentifyMenu;
113112
}
114113

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

259-
for ( auto layer : mCanvas->layers() )
258+
const QList<QgsMapLayer*> layers = mCanvas->layers();
259+
for ( auto layer : layers )
260260
{
261261
if ( layer->type() == QgsMapLayer::VectorLayer )
262262
{

‎src/app/qgsmaptoolselectionhandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class QgsMapToolSelectionHandler : public QObject
199199
QColor mStrokeColor = QColor( 254, 58, 29, 100 );
200200

201201
//! Shows features to select polygon from existing features
202-
QgsIdentifyMenu *mIdentifyMenu = nullptr;
202+
QgsIdentifyMenu *mIdentifyMenu = nullptr; // owned by canvas
203203
};
204204

205205
#endif

‎src/gui/qgsidentifymenu.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "qgssettings.h"
2727
#include "qgsgui.h"
2828

29+
//TODO 4.0 add explicitely qobject parent to constructor
2930
QgsIdentifyMenu::QgsIdentifyMenu( QgsMapCanvas *canvas )
3031
: QMenu( canvas )
3132
, mCanvas( canvas )

0 commit comments

Comments
 (0)
Please sign in to comment.