Skip to content

Commit

Permalink
Fixed issues with projected crs list not being properly filed under t…
Browse files Browse the repository at this point in the history
…he appropriate node and not being grouped. Also expand the proj node by default.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9029 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Aug 8, 2008
1 parent 47e37f4 commit a3ba535
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/gui/qgsprojectionselector.cpp
Expand Up @@ -643,7 +643,7 @@ void QgsProjectionSelector::applyProjList(QSet<QString> * crsFilter)
while(sqlite3_step(ppStmt) == SQLITE_ROW)
{
// check to see if the srs is geographic
int isGeo = sqlite3_column_int(ppStmt, 2);
int isGeo = sqlite3_column_int(ppStmt, 3);
if(isGeo)
{
// this is a geographic coordinate system
Expand All @@ -659,16 +659,11 @@ void QgsProjectionSelector::applyProjList(QSet<QString> * crsFilter)
else
{
// This is a projected srs

if (previousSrsTypeNode == NULL)
{
previousSrsTypeNode = mProjList;
}
QTreeWidgetItem *node;
QString srsType = QString::fromUtf8((char*)sqlite3_column_text(ppStmt, 3));
QString srsType = QString::fromUtf8((char*)sqlite3_column_text(ppStmt, 4));
// Find the node for this type and add the projection to it
// If the node doesn't exist, create it
if (srsType == previousSrsType)
if (srsType == previousSrsType )
{
node = previousSrsTypeNode;
}
Expand Down Expand Up @@ -701,6 +696,7 @@ void QgsProjectionSelector::applyProjList(QSet<QString> * crsFilter)
newItem->setText(QGIS_SRS_ID_COLUMN,QString::fromUtf8((char *)sqlite3_column_text(ppStmt, 1)));
}
}
mProjList->setExpanded(true);
}
// close the sqlite3 statement
sqlite3_finalize(ppStmt);
Expand Down

0 comments on commit a3ba535

Please sign in to comment.