Skip to content

Commit b8fd1fd

Browse files
committed
Some more use of QgsProject crs instead of canvas crs
1 parent 8593e38 commit b8fd1fd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/app/qgisapp.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ void QgisApp::validateCrs( QgsCoordinateReferenceSystem &srs )
533533
QgsProjectionSelectionDialog *mySelector = new QgsProjectionSelectionDialog();
534534
mySelector->setMessage( srs.validationHint() ); //shows a generic message, if not specified
535535
if ( sAuthId.isNull() )
536-
sAuthId = QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs().authid();
536+
sAuthId = QgsProject::instance()->crs().authid();
537537

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

1053710537
mOnTheFlyProjectionStatusButton->setToolTip(
10538-
tr( "Current CRS: %1" ).arg( mMapCanvas->mapSettings().destinationCrs().description() ) );
10538+
tr( "Current CRS: %1" ).arg( QgsProject::instance()->crs().description() ) );
1053910539
mOnTheFlyProjectionStatusButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mIconProjectionEnabled.svg" ) ) );
1054010540
}
1054110541
else

src/app/qgsbrowserdockwidget.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void QgsBrowserLayerProperties::setItem( QgsDataItem *item )
186186
if ( defaultProjectionOption == QLatin1String( "prompt" ) )
187187
{
188188
QgsCoordinateReferenceSystem defaultCrs =
189-
QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs();
189+
QgsProject::instance()->crs();
190190
if ( layerCrs == defaultCrs )
191191
mNoticeLabel->setText( "NOTICE: Layer srs set from project (" + defaultCrs.authid() + ')' );
192192
}

0 commit comments

Comments
 (0)