Skip to content
Permalink
Browse files

Show 'unknown CRS' in status bar instead of blank text when project

CRS is set to an unknown CRS

Refs #33458

(cherry picked from commit c6319b2)
  • Loading branch information
nyalldawson committed Feb 4, 2020
1 parent 9347d9d commit 7c866701d7ef44bdc70de7a9a8017bb1240c0b24
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/app/qgisapp.cpp
@@ -12503,12 +12503,16 @@ void QgisApp::removeWebToolBarIcon( QAction *qAction )

void QgisApp::updateCrsStatusBar()
{
if ( QgsProject::instance()->crs().isValid() )
const QgsCoordinateReferenceSystem projectCrs = QgsProject::instance()->crs();
if ( projectCrs.isValid() )
{
mOnTheFlyProjectionStatusButton->setText( QgsProject::instance()->crs().authid() );
if ( !projectCrs.authid().isEmpty() )
mOnTheFlyProjectionStatusButton->setText( projectCrs.authid() );
else
mOnTheFlyProjectionStatusButton->setText( QObject::tr( "Unknown CRS" ) );

mOnTheFlyProjectionStatusButton->setToolTip(
tr( "Current CRS: %1" ).arg( QgsProject::instance()->crs().userFriendlyIdentifier() ) );
tr( "Current CRS: %1" ).arg( projectCrs.userFriendlyIdentifier() ) );
mOnTheFlyProjectionStatusButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mIconProjectionEnabled.svg" ) ) );
}
else

0 comments on commit 7c86670

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