Skip to content

Commit a00039c

Browse files
committed
delete ring: consider reprojection when search for clicked ring (fixes #11502)
1 parent cc4fc5a commit a00039c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/app/qgscustomization.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,8 @@ bool QgsCustomizationDialog::switchWidget( QWidget *widget, QMouseEvent *e )
400400
{
401401
QToolButton* toolbutton = qobject_cast<QToolButton*>( widget );
402402
QAction* action = toolbutton->defaultAction();
403+
if ( !action )
404+
return false;
403405
QString toolbarName = widget->parent()->objectName();
404406
QString actionName = action->objectName();
405407
path = "/Toolbars/" + toolbarName + "/" + actionName;

src/app/qgsmaptooldeletering.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ QgsGeometry* QgsMapToolDeleteRing::ringUnderPoint( QgsPoint p, QgsFeatureId& fid
117117
//so we iterate over all the features visible in the canvas
118118
//If several rings are found at this position, the smallest one is chosen,
119119
//in order to be able to delete a ring inside another ring
120-
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( mCanvas->extent() ) );
120+
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( toLayerCoordinates( vlayer, mCanvas->extent() ) ) );
121121
QgsFeature f;
122122
QgsGeometry* g;
123123
QgsGeometry* ringGeom = 0;

0 commit comments

Comments
 (0)