Skip to content
Permalink
Browse files

Fix fill ring tool used with advanced digitising crashes QGIS

(fix #13355)
(cherry-picked from aa4d65d)
  • Loading branch information
nyalldawson committed Nov 18, 2015
1 parent a1479a7 commit f98fd331ce352722039634fdee38905d21bc54e4
Showing with 6 additions and 17 deletions.
  1. +6 −17 src/app/qgsmaptoolfillring.cpp
@@ -122,25 +122,14 @@ void QgsMapToolFillRing::canvasMapReleaseEvent( QgsMapMouseEvent * e )
yMin = std::numeric_limits<double>::max();
yMax = -std::numeric_limits<double>::max();

for ( QList<QgsPoint>::const_iterator it = points().constBegin(); it != points().constEnd(); ++it )
Q_FOREACH ( const QgsPoint& point, points() )
{
if ( it->x() < xMin )
{
xMin = it->x();
}
if ( it->x() > xMax )
{
xMax = it->x();
}
if ( it->y() < yMin )
{
yMin = it->y();
}
if ( it->y() > yMax )
{
yMax = it->y();
}
xMin = qMin( xMin, point.x() );
xMax = qMax( xMax, point.x() );
yMin = qMin( yMin, point.y() );
yMax = qMax( yMax, point.y() );
}

bBox.setXMinimum( xMin );
bBox.setYMinimum( yMin );
bBox.setXMaximum( xMax );

0 comments on commit f98fd33

Please sign in to comment.
You can’t perform that action at this time.