Settings -> Project Properties -> Projections now shows, as selected, the current projection. Previously nothing was selected, making it difficult to determine what the current projection actually was.

This is because QgsProjectionSelector::setSelectedSRSID() now works as advertised when called externally.

It didn't work before, because setSelectedSRSID() did not make sure the tree widget was pre-populated with the projection list.

This commit is a pre-requisite to fixing #11.  This is so that we can actually perform the experiment to prove future bug fixes against #11.



git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5618 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
morb_au 2006-07-21 03:11:11 +00:00
parent d5a4a56a5a
commit 6f42a275d2

View File

@ -146,6 +146,19 @@ QString QgsProjectionSelector::ogcWmsCrsFilterAsSqlExpression(QSet<QString> * cr
void QgsProjectionSelector::setSelectedSRSName(QString theSRSName)
{
// ensure the projection list view is actually populated
// before we select from its contents
if (!mProjListDone)
{
applyProjList(&mCrsFilter);
}
if (!mUserProjListDone)
{
applyUserProjList(&mCrsFilter);
}
mSRSNameSelection = theSRSName;
mSRSNameSelectionPending = TRUE;
applySRSNameSelection();
@ -154,6 +167,19 @@ void QgsProjectionSelector::setSelectedSRSName(QString theSRSName)
void QgsProjectionSelector::setSelectedSRSID(long theSRSID)
{
// ensure the projection list view is actually populated
// before we select from its contents
if (!mProjListDone)
{
applyProjList(&mCrsFilter);
}
if (!mUserProjListDone)
{
applyUserProjList(&mCrsFilter);
}
mSRSIDSelection = theSRSID;
mSRSIDSelectionPending = TRUE;
applySRSIDSelection();