Skip to content

Commit

Permalink
Attempt to fallback to project CRS if no defaultCRS specified in QgsO…
Browse files Browse the repository at this point in the history
…WSSourceSelect
  • Loading branch information
manisandro authored and nyalldawson committed Jun 15, 2021
1 parent b673742 commit b05f94a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/gui/qgsowssourceselect.cpp
Expand Up @@ -451,8 +451,15 @@ void QgsOWSSourceSelect::populateCrs()

if ( it == mSelectedLayersCRSs.constEnd() )
{
// not found
mSelectedCRS = defaultCRS;
if ( mSelectedLayersCRSs.find( QgsProject::instance()->crs().authid() ) != mSelectedLayersCRSs.end() )
{
mSelectedCRS = QgsProject::instance()->crs().authid();
}
else
{
// not found
mSelectedCRS = defaultCRS;
}
}
mSelectedCRSLabel->setText( descriptionForAuthId( mSelectedCRS ) );
mChangeCRSButton->setEnabled( true );
Expand Down

0 comments on commit b05f94a

Please sign in to comment.