File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ void QgsMapToolSimplify::canvasPressEvent( QMouseEvent * e )
259
259
vlayer->select ( QgsAttributeList (), selectRect, true );
260
260
261
261
QgsGeometry* geometry = QgsGeometry::fromPoint ( layerCoords );
262
- double minDistance = 10000000 ;
262
+ double minDistance = DBL_MAX ;
263
263
double currentDistance;
264
264
QgsFeature f;
265
265
@@ -274,16 +274,18 @@ void QgsMapToolSimplify::canvasPressEvent( QMouseEvent * e )
274
274
mSelectedFeature = f;
275
275
}
276
276
}
277
- if ( mSelectedFeature .geometry ()->isMultipart () )
278
- {
279
- QMessageBox::critical ( 0 , tr ( " Unsupported operation" ), tr ( " Multipart features are not supported for simplification." ) );
280
- return ;
281
- }
277
+
282
278
// delete previous rubberband (if any)
283
279
removeRubberBand ();
284
280
285
281
if ( mSelectedFeature .isValid () )
286
282
{
283
+ if ( mSelectedFeature .geometry ()->isMultipart () )
284
+ {
285
+ QMessageBox::critical ( 0 , tr ( " Unsupported operation" ), tr ( " Multipart features are not supported for simplification." ) );
286
+ return ;
287
+ }
288
+
287
289
mRubberBand = new QgsRubberBand ( mCanvas );
288
290
mRubberBand ->setToGeometry ( mSelectedFeature .geometry (), false );
289
291
mRubberBand ->setColor ( Qt::red );
You can’t perform that action at this time.
0 commit comments