Skip to content
Permalink
Browse files

push a message bar informing user of crs applied to newly added layer…

… missing crs
  • Loading branch information
nirvn committed Mar 5, 2014
1 parent 837642b commit 8f70e3000df213b2870e6e4f3c367adb9b047dfb
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/app/qgisapp.cpp
@@ -421,15 +421,16 @@ void QgisApp::validateSrs( QgsCoordinateReferenceSystem &srs )
{
// XXX TODO: Change project to store selected CS as 'projectCRS' not 'selectedWkt'
authid = QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs().authid();
QgsDebugMsg( "Layer srs set from project: " + authid );
QgisApp::instance()->statusBar()->showMessage( tr( "CRS undefined - defaulting to project CRS" ) );
srs.createFromOgcWmsCrs( authid );
QgsDebugMsg( "Layer srs set from project: " + authid );
messageBar()->pushMessage( tr( "Warning" ), tr( "CRS undefined - defaulting to project CRS" ), QgsMessageBar::WARNING, messageTimeout() );
}
else ///Projections/defaultBehaviour==useGlobal
{
authid = mySettings.value( "/Projections/layerDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString();
srs.createFromOgcWmsCrs( authid );
QgisApp::instance()->statusBar()->showMessage( tr( "CRS undefined - defaulting to default CRS: %1" ).arg( authid ) );
QgsDebugMsg( "Layer srs set from default: " + authid );
messageBar()->pushMessage( tr( "Warning" ), tr( "CRS undefined - defaulting to default CRS: %1" ).arg( authid ), QgsMessageBar::WARNING, messageTimeout() );
}
}

0 comments on commit 8f70e30

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