Skip to content

Commit

Permalink
show loading layer in status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Apr 17, 2013
1 parent 51e5894 commit a56c05a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -1836,6 +1836,8 @@ void QgisApp::setupConnections()
this, SLOT( oldProjectVersionWarning( QString ) ) );
connect( QgsProject::instance(), SIGNAL( layerLoaded( int, int ) ),
this, SLOT( showProgress( int, int ) ) );
connect( QgsProject::instance(), SIGNAL( loadingLayer( QString ) ),
this, SLOT( showStatusMessage( QString ) ) );
connect( QgsProject::instance(), SIGNAL( readProject( const QDomDocument & ) ),
this, SLOT( readProject( const QDomDocument & ) ) );
connect( QgsProject::instance(), SIGNAL( writeProject( QDomDocument & ) ),
Expand Down
4 changes: 4 additions & 0 deletions src/core/qgsproject.cpp
Expand Up @@ -685,6 +685,10 @@ QPair< bool, QList<QDomNode> > QgsProject::_getMapLayers( QDomDocument const &do
QDomNode node = nl.item( i );
QDomElement element = node.toElement();

QString name = node.namedItem( "layername" ).toElement().text();
if( !name.isNull() )
emit loadingLayer( tr( "Loading layer %1" ).arg( name ) );

if ( element.attribute( "embedded" ) == "1" )
{
createEmbeddedLayer( element.attribute( "id" ), readPath( element.attribute( "project" ) ), brokenNodes, vLayerList );
Expand Down
2 changes: 2 additions & 0 deletions src/core/qgsproject.h
Expand Up @@ -348,6 +348,8 @@ class CORE_EXPORT QgsProject : public QObject
// @param n number of layers
void layerLoaded( int i, int n );

void loadingLayer( QString );

void snapSettingsChanged();

private:
Expand Down

0 comments on commit a56c05a

Please sign in to comment.