File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 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 )
259259 vlayer->select ( QgsAttributeList (), selectRect, true );
260260
261261 QgsGeometry* geometry = QgsGeometry::fromPoint ( layerCoords );
262- double minDistance = 10000000 ;
262+ double minDistance = DBL_MAX ;
263263 double currentDistance;
264264 QgsFeature f;
265265
@@ -274,16 +274,18 @@ void QgsMapToolSimplify::canvasPressEvent( QMouseEvent * e )
274274 mSelectedFeature = f;
275275 }
276276 }
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+
282278 // delete previous rubberband (if any)
283279 removeRubberBand ();
284280
285281 if ( mSelectedFeature .isValid () )
286282 {
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+
287289 mRubberBand = new QgsRubberBand ( mCanvas );
288290 mRubberBand ->setToGeometry ( mSelectedFeature .geometry (), false );
289291 mRubberBand ->setColor ( Qt::red );
You can’t perform that action at this time.
0 commit comments