Skip to content

Commit f7c3469

Browse files
jef-nmach0
authored andcommitted
fix #4282
1 parent dd461e0 commit f7c3469

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/core/qgscoordinatetransform.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,15 @@ QgsRectangle QgsCoordinateTransform::transformBoundingBox( const QgsRectangle re
350350
// This is done by looking at a number of points spread evenly
351351
// across the rectangle
352352

353-
if ( mShortCircuit || !mInitialisedFlag || rect.isEmpty() )
353+
if ( mShortCircuit || !mInitialisedFlag )
354354
return rect;
355355

356+
if ( rect.isEmpty() )
357+
{
358+
QgsPoint p = transform( rect.xMinimum(), rect.yMinimum(), direction );
359+
return QgsRectangle( p, p );
360+
}
361+
356362
static const int numP = 8;
357363

358364
QgsRectangle bb_rect;

0 commit comments

Comments
 (0)