Skip to content
Permalink
Browse files

show progress when loading composers

  • Loading branch information
jef-n committed Feb 23, 2016
1 parent 2ad32f1 commit 1e3c64dae448a94a451c040f1c72af48c842e376
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/app/qgisapp.cpp
@@ -6139,7 +6139,13 @@ bool QgisApp::loadComposersFromProject( const QDomDocument& doc )
QDomNodeList composerNodes = doc.elementsByTagName( "Composer" );
for ( int i = 0; i < composerNodes.size(); ++i )
{
QString title( composerNodes.at( i ).toElement().attribute( "title" ) );
showStatusMessage( tr( "Loading composer %1" ).arg( title ) );
showProgress( i, composerNodes.size() );
++mLastComposerId;

QTime t;
t.start();
QgsComposer* composer = new QgsComposer( this, tr( "Composer %1" ).arg( mLastComposerId ) );
composer->readXML( composerNodes.at( i ).toElement(), doc );
mPrintComposers.insert( composer );
@@ -6162,7 +6168,12 @@ bool QgisApp::loadComposersFromProject( const QDomDocument& doc )
connect( composer, SIGNAL( composerAdded( QgsComposerView* ) ), this, SIGNAL( composerAdded( QgsComposerView* ) ) );
connect( composer, SIGNAL( composerWillBeRemoved( QgsComposerView* ) ), this, SIGNAL( composerWillBeRemoved( QgsComposerView* ) ) );
connect( composer, SIGNAL( atlasPreviewFeatureChanged() ), this, SLOT( refreshMapCanvas() ) );

QgsDebugMsg( QString( "Loaded composer %1: %2ms" ).arg( title ).arg( t.elapsed() ) );
}

showProgress( 0, 0 );

return true;
}

0 comments on commit 1e3c64d

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