Skip to content
Permalink
Browse files

[composer] Fix loading atlas settings from pre 2.2 projects (fix #9567)

  • Loading branch information
nyalldawson committed Feb 15, 2014
1 parent efec316 commit 366daa7e3b71f1fe890cd961779a5548d3ad7b47
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/core/composer/qgsatlascomposition.cpp
@@ -594,17 +594,18 @@ void QgsAtlasComposition::readXML( const QDomElement& atlasElem, const QDomDocum
}
}
//look for stored composer map, to upgrade pre 2.1 projects
int composerMapNo = atlasElem.attribute( "composerMap", "0" ).toInt();
int composerMapNo = atlasElem.attribute( "composerMap", "-1" ).toInt();
QgsComposerMap * composerMap = 0;
if ( composerMapNo != 0 )
if ( composerMapNo != -1 )
{
QList<QgsComposerMap*> maps;
mComposition->composerItems( maps );
for ( QList<QgsComposerMap*>::iterator it = maps.begin(); it != maps.end(); ++it )
{
if (( *it )->id() == composerMapNo )
{
( *it )->setAtlasDriven( true );
composerMap = ( *it );
composerMap->setAtlasDriven( true );
break;
}
}

0 comments on commit 366daa7

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