Skip to content

Commit

Permalink
Add comments to explain why r5618 only partly works as expected under…
Browse files Browse the repository at this point in the history
… Qt 4.1.0 (i.e. the branches are expanded but the selected item is not scrolled into view).

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5626 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
morb_au committed Jul 24, 2006
1 parent a66e202 commit 6e6c1cb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/widgets/projectionselector/qgsprojectionselector.cpp
Expand Up @@ -203,6 +203,11 @@ void QgsProjectionSelector::applySRSNameSelection()
if (nodes.count() > 0)
{
lstCoordinateSystems->setCurrentItem(nodes.first());

// The following seems to be broken in Qt 4.1.0:
// It only works if the widget is already visible.
// (Which makes it really hard to scroll to an
// item before you exec() the widget)
lstCoordinateSystems->scrollToItem(nodes.first());
}
else // unselect the selected item to avoid confusing the user
Expand Down Expand Up @@ -230,6 +235,11 @@ void QgsProjectionSelector::applySRSIDSelection()
if (nodes.count() > 0)
{
lstCoordinateSystems->setCurrentItem(nodes.first());

// The following seems to be broken in Qt 4.1.0:
// It only works if the widget is already visible.
// (Which makes it really hard to scroll to an
// item before you exec() the widget)
lstCoordinateSystems->scrollToItem(nodes.first());
}
else // unselect the selected item to avoid confusing the user
Expand Down Expand Up @@ -784,6 +794,11 @@ void QgsProjectionSelector::coordinateSystemSelected( QTreeWidgetItem * theItem)
{
myDescription+=(myProjString);
}

// The following seems to be broken in Qt 4.1.0:
// It only works if the widget is already visible.
// (Which makes it really hard to scroll to an
// item before you exec() the widget)
lstCoordinateSystems->scrollToItem(theItem);
teProjection->setText(myDescription);
}
Expand Down

0 comments on commit 6e6c1cb

Please sign in to comment.