Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 committed Nov 12, 2007
1 parent 41bc573 commit 4346694
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/qgsserversourceselect.cpp
Expand Up @@ -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) );
}
Expand Down

0 comments on commit 4346694

Please sign in to comment.