mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Merge pull request #1223 from nirvn/messagebar_auto_crs
push a message bar informing user of crs applied to newly added layer missing a crs
This commit is contained in:
commit
08965ed2f0
@ -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( "CRS was undefined" ), tr( "defaulting to project CRS %1 - %2" ).arg( authid ).arg( srs.description() ), 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( "CRS was undefined" ), tr( "defaulting to CRS %1 - %2" ).arg( authid ).arg( srs.description() ), QgsMessageBar::WARNING, messageTimeout() );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user