Skip to content
Permalink
Browse files

automatically set the project CRS in WMS layer selection dialog

git-svn-id: http://svn.osgeo.org/qgis/trunk@7384 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Nov 12, 2007
1 parent 41bc573 commit 4346694243dd76f355364cea16c9f0c14cd73d44
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/app/qgsserversourceselect.cpp
@@ -93,6 +93,18 @@ QgsServerSourceSelect::QgsServerSourceSelect(QgisApp * app, QWidget * parent, Qt
// set up the WMS connections we already know about
populateConnectionList();

//set the current project CRS if available
long currentSRS = QgsProject::instance()->readNumEntry("SpatialRefSys", "/ProjectSRSID", -1);
if(currentSRS != -1)
{
//convert SRS id to epsg
QgsSpatialRefSys currentRefSys(currentSRS, QgsSpatialRefSys::QGIS_SRSID);
if(currentRefSys.isValid())
{
m_Epsg = currentRefSys.epsg();
}
}

// set up the default WMS Coordinate Reference System
labelCoordRefSys->setText( descriptionForEpsg(m_Epsg) );
}

0 comments on commit 4346694

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