Skip to content

Commit 8f70e30

Browse files
committedMar 5, 2014
push a message bar informing user of crs applied to newly added layer missing crs
1 parent 837642b commit 8f70e30

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,15 +421,16 @@ void QgisApp::validateSrs( QgsCoordinateReferenceSystem &srs )
421421
{
422422
// XXX TODO: Change project to store selected CS as 'projectCRS' not 'selectedWkt'
423423
authid = QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs().authid();
424-
QgsDebugMsg( "Layer srs set from project: " + authid );
425-
QgisApp::instance()->statusBar()->showMessage( tr( "CRS undefined - defaulting to project CRS" ) );
426424
srs.createFromOgcWmsCrs( authid );
425+
QgsDebugMsg( "Layer srs set from project: " + authid );
426+
messageBar()->pushMessage( tr( "Warning" ), tr( "CRS undefined - defaulting to project CRS" ), QgsMessageBar::WARNING, messageTimeout() );
427427
}
428428
else ///Projections/defaultBehaviour==useGlobal
429429
{
430430
authid = mySettings.value( "/Projections/layerDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString();
431431
srs.createFromOgcWmsCrs( authid );
432-
QgisApp::instance()->statusBar()->showMessage( tr( "CRS undefined - defaulting to default CRS: %1" ).arg( authid ) );
432+
QgsDebugMsg( "Layer srs set from default: " + authid );
433+
messageBar()->pushMessage( tr( "Warning" ), tr( "CRS undefined - defaulting to default CRS: %1" ).arg( authid ), QgsMessageBar::WARNING, messageTimeout() );
433434
}
434435
}
435436

0 commit comments

Comments
 (0)
Please sign in to comment.