Skip to content

Commit

Permalink
[composer] Fix hang with enabling atlas on a map with a point coverag…
Browse files Browse the repository at this point in the history
…e layer while preview is active
  • Loading branch information
nyalldawson committed May 25, 2014
1 parent 9329980 commit 41e37e1
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/core/composer/qgsatlascomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 41e37e1

Please sign in to comment.