Skip to content

Commit 41e37e1

Browse files
committedMay 25, 2014
[composer] Fix hang with enabling atlas on a map with a point coverage layer while preview is active
1 parent 9329980 commit 41e37e1

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed
 

‎src/core/composer/qgsatlascomposition.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,22 @@ void QgsAtlasComposition::prepareMap( QgsComposerMap* map )
436436
QgsRectangle new_extent = mTransformedFeatureBounds;
437437
QgsRectangle mOrigExtent = map->extent();
438438

439-
if ( map->atlasScalingMode() == QgsComposerMap::Fixed )
439+
//sanity check - only allow fixed scale mode for point layers
440+
bool isPointLayer = false;
441+
switch ( mCoverageLayer->wkbType() )
442+
{
443+
case QGis::WKBPoint:
444+
case QGis::WKBPoint25D:
445+
case QGis::WKBMultiPoint:
446+
case QGis::WKBMultiPoint25D:
447+
isPointLayer = true;
448+
break;
449+
default:
450+
isPointLayer = false;
451+
break;
452+
}
453+
454+
if ( map->atlasScalingMode() == QgsComposerMap::Fixed || isPointLayer )
440455
{
441456
// only translate, keep the original scale (i.e. width x height)
442457

0 commit comments

Comments
 (0)
Please sign in to comment.