Skip to content
Permalink
Browse files
Some more use of QgsProject crs instead of canvas crs
  • Loading branch information
nyalldawson committed Mar 22, 2017
1 parent 8593e38 commit b8fd1fd7db1b567e861594d3759a0571f46c194b
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/app/qgisapp.cpp
  2. +1 −1 src/app/qgsbrowserdockwidget.cpp
@@ -533,7 +533,7 @@ void QgisApp::validateCrs( QgsCoordinateReferenceSystem &srs )
QgsProjectionSelectionDialog *mySelector = new QgsProjectionSelectionDialog();
mySelector->setMessage( srs.validationHint() ); //shows a generic message, if not specified
if ( sAuthId.isNull() )
sAuthId = QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs().authid();
sAuthId = QgsProject::instance()->crs().authid();

QgsCoordinateReferenceSystem defaultCrs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( sAuthId );
if ( defaultCrs.isValid() )
@@ -10535,7 +10535,7 @@ void QgisApp::updateCrsStatusBar()
mOnTheFlyProjectionStatusButton->setText( QgsProject::instance()->crs().authid() );

mOnTheFlyProjectionStatusButton->setToolTip(
tr( "Current CRS: %1" ).arg( mMapCanvas->mapSettings().destinationCrs().description() ) );
tr( "Current CRS: %1" ).arg( QgsProject::instance()->crs().description() ) );
mOnTheFlyProjectionStatusButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mIconProjectionEnabled.svg" ) ) );
}
else
@@ -186,7 +186,7 @@ void QgsBrowserLayerProperties::setItem( QgsDataItem *item )
if ( defaultProjectionOption == QLatin1String( "prompt" ) )
{
QgsCoordinateReferenceSystem defaultCrs =
QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs();
QgsProject::instance()->crs();
if ( layerCrs == defaultCrs )
mNoticeLabel->setText( "NOTICE: Layer srs set from project (" + defaultCrs.authid() + ')' );
}

0 comments on commit b8fd1fd

Please sign in to comment.