Skip to content
Permalink
Browse files
Attempt to fallback to project CRS if no defaultCRS specified in QgsO…
…WSSourceSelect
  • Loading branch information
manisandro authored and nyalldawson committed Jun 15, 2021
1 parent b673742 commit b05f94ab0c46635b4b9b0cf56bd4ffaf486df871
Showing with 9 additions and 2 deletions.
  1. +9 −2 src/gui/qgsowssourceselect.cpp
@@ -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 );

0 comments on commit b05f94a

Please sign in to comment.