Skip to content
Permalink
Browse files

[composer] Make sure signals for overview extent changing are reconne…

…cted after loading composition
  • Loading branch information
nyalldawson committed Jan 1, 2014
1 parent 728a1b0 commit 353f94c2803b5e420cacae9aaf4a1dda885fa1c7
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/core/composer/qgscomposition.cpp
@@ -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 )

0 comments on commit 353f94c

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