Skip to content

Commit a56c05a

Browse files
committedApr 17, 2013
show loading layer in status bar
1 parent 51e5894 commit a56c05a

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,6 +1836,8 @@ void QgisApp::setupConnections()
18361836
this, SLOT( oldProjectVersionWarning( QString ) ) );
18371837
connect( QgsProject::instance(), SIGNAL( layerLoaded( int, int ) ),
18381838
this, SLOT( showProgress( int, int ) ) );
1839+
connect( QgsProject::instance(), SIGNAL( loadingLayer( QString ) ),
1840+
this, SLOT( showStatusMessage( QString ) ) );
18391841
connect( QgsProject::instance(), SIGNAL( readProject( const QDomDocument & ) ),
18401842
this, SLOT( readProject( const QDomDocument & ) ) );
18411843
connect( QgsProject::instance(), SIGNAL( writeProject( QDomDocument & ) ),

‎src/core/qgsproject.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,10 @@ QPair< bool, QList<QDomNode> > QgsProject::_getMapLayers( QDomDocument const &do
685685
QDomNode node = nl.item( i );
686686
QDomElement element = node.toElement();
687687

688+
QString name = node.namedItem( "layername" ).toElement().text();
689+
if( !name.isNull() )
690+
emit loadingLayer( tr( "Loading layer %1" ).arg( name ) );
691+
688692
if ( element.attribute( "embedded" ) == "1" )
689693
{
690694
createEmbeddedLayer( element.attribute( "id" ), readPath( element.attribute( "project" ) ), brokenNodes, vLayerList );

‎src/core/qgsproject.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ class CORE_EXPORT QgsProject : public QObject
348348
// @param n number of layers
349349
void layerLoaded( int i, int n );
350350

351+
void loadingLayer( QString );
352+
351353
void snapSettingsChanged();
352354

353355
private:

0 commit comments

Comments
 (0)
Please sign in to comment.