Skip to content
Permalink
Browse files
[composer] Fix hang with enabling atlas on a map with a point coverag…
…e layer while preview is active
  • Loading branch information
nyalldawson committed May 25, 2014
1 parent 9329980 commit 41e37e10c19697d4265081f830a5007d0f60b0e6
Showing with 16 additions and 1 deletion.
  1. +16 −1 src/core/composer/qgsatlascomposition.cpp
@@ -436,7 +436,22 @@ void QgsAtlasComposition::prepareMap( QgsComposerMap* map )
QgsRectangle new_extent = mTransformedFeatureBounds;
QgsRectangle mOrigExtent = map->extent();

if ( map->atlasScalingMode() == QgsComposerMap::Fixed )
//sanity check - only allow fixed scale mode for point layers
bool isPointLayer = false;
switch ( mCoverageLayer->wkbType() )
{
case QGis::WKBPoint:
case QGis::WKBPoint25D:
case QGis::WKBMultiPoint:
case QGis::WKBMultiPoint25D:
isPointLayer = true;
break;
default:
isPointLayer = false;
break;
}

if ( map->atlasScalingMode() == QgsComposerMap::Fixed || isPointLayer )
{
// only translate, keep the original scale (i.e. width x height)

0 comments on commit 41e37e1

Please sign in to comment.