Skip to content
Permalink
Browse files
Add comments to explain why r5618 only partly works as expected under…
… 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 6e6c1cb3c046d83304ee0b3722e75bafc8205c9c
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/widgets/projectionselector/qgsprojectionselector.cpp
@@ -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
@@ -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
@@ -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);
}

0 comments on commit 6e6c1cb

Please sign in to comment.