Skip to content

Commit a3ba535

Browse files
author
timlinux
committed
Fixed issues with projected crs list not being properly filed under the 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
1 parent 47e37f4 commit a3ba535

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/gui/qgsprojectionselector.cpp

+4-8
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ void QgsProjectionSelector::applyProjList(QSet<QString> * crsFilter)
643643
while(sqlite3_step(ppStmt) == SQLITE_ROW)
644644
{
645645
// check to see if the srs is geographic
646-
int isGeo = sqlite3_column_int(ppStmt, 2);
646+
int isGeo = sqlite3_column_int(ppStmt, 3);
647647
if(isGeo)
648648
{
649649
// this is a geographic coordinate system
@@ -659,16 +659,11 @@ void QgsProjectionSelector::applyProjList(QSet<QString> * crsFilter)
659659
else
660660
{
661661
// This is a projected srs
662-
663-
if (previousSrsTypeNode == NULL)
664-
{
665-
previousSrsTypeNode = mProjList;
666-
}
667662
QTreeWidgetItem *node;
668-
QString srsType = QString::fromUtf8((char*)sqlite3_column_text(ppStmt, 3));
663+
QString srsType = QString::fromUtf8((char*)sqlite3_column_text(ppStmt, 4));
669664
// Find the node for this type and add the projection to it
670665
// If the node doesn't exist, create it
671-
if (srsType == previousSrsType)
666+
if (srsType == previousSrsType )
672667
{
673668
node = previousSrsTypeNode;
674669
}
@@ -701,6 +696,7 @@ void QgsProjectionSelector::applyProjList(QSet<QString> * crsFilter)
701696
newItem->setText(QGIS_SRS_ID_COLUMN,QString::fromUtf8((char *)sqlite3_column_text(ppStmt, 1)));
702697
}
703698
}
699+
mProjList->setExpanded(true);
704700
}
705701
// close the sqlite3 statement
706702
sqlite3_finalize(ppStmt);

0 commit comments

Comments
 (0)