Skip to content

Commit 095e37f

Browse files
author
morb_au
committedJul 21, 2006
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@5618 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6cf9f11 commit 095e37f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
 

‎src/widgets/projectionselector/qgsprojectionselector.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,19 @@ QString QgsProjectionSelector::ogcWmsCrsFilterAsSqlExpression(QSet<QString> * cr
146146

147147
void QgsProjectionSelector::setSelectedSRSName(QString theSRSName)
148148
{
149+
// ensure the projection list view is actually populated
150+
// before we select from its contents
151+
152+
if (!mProjListDone)
153+
{
154+
applyProjList(&mCrsFilter);
155+
}
156+
157+
if (!mUserProjListDone)
158+
{
159+
applyUserProjList(&mCrsFilter);
160+
}
161+
149162
mSRSNameSelection = theSRSName;
150163
mSRSNameSelectionPending = TRUE;
151164
applySRSNameSelection();
@@ -154,6 +167,19 @@ void QgsProjectionSelector::setSelectedSRSName(QString theSRSName)
154167

155168
void QgsProjectionSelector::setSelectedSRSID(long theSRSID)
156169
{
170+
// ensure the projection list view is actually populated
171+
// before we select from its contents
172+
173+
if (!mProjListDone)
174+
{
175+
applyProjList(&mCrsFilter);
176+
}
177+
178+
if (!mUserProjListDone)
179+
{
180+
applyUserProjList(&mCrsFilter);
181+
}
182+
157183
mSRSIDSelection = theSRSID;
158184
mSRSIDSelectionPending = TRUE;
159185
applySRSIDSelection();

0 commit comments

Comments
 (0)
Please sign in to comment.