Skip to content

Commit

Permalink
Some more use of QgsProject crs instead of canvas crs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 22, 2017
1 parent 8593e38 commit b8fd1fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -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() )
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsbrowserdockwidget.cpp
Expand Up @@ -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() + ')' );
}
Expand Down

0 comments on commit b8fd1fd

Please sign in to comment.