Skip to content

Commit

Permalink
[composer] Make sure signals for overview extent changing are reconne…
Browse files Browse the repository at this point in the history
…cted after loading composition
  • Loading branch information
nyalldawson committed Jan 1, 2014
1 parent 728a1b0 commit 353f94c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/core/composer/qgscomposition.cpp
Expand Up @@ -796,6 +796,21 @@ void QgsComposition::addItemsFromXML( const QDomElement& elem, const QDomDocumen
pushAddRemoveCommand( newMap, tr( "Map added" ) );
}
}
//now that all map items have been created, re-connect overview map signals
QList<QgsComposerMap*> maps;
composerItems( maps );
for ( QList<QgsComposerMap*>::iterator mit = maps.begin(); mit != maps.end(); ++mit )
{
if (( *mit )->overviewFrameMapId() != -1 )
{
const QgsComposerMap* overviewMap = getComposerMapById(( *mit )->overviewFrameMapId() );
if ( overviewMap )
{
QObject::connect( overviewMap, SIGNAL( extentChanged() ), *mit, SLOT( overviewExtentChanged() ) );
}
}
}

// arrow
QDomNodeList composerArrowList = elem.elementsByTagName( "ComposerArrow" );
for ( int i = 0; i < composerArrowList.size(); ++i )
Expand Down

0 comments on commit 353f94c

Please sign in to comment.