Skip to content

Commit 4193d8b

Browse files
author
jef
committed
fix: center selected item in CRS selection
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15452 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 278b53b commit 4193d8b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/gui/qgsprojectionselector.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ void QgsProjectionSelector::applyCRSNameSelection()
305305
if ( nodes.count() > 0 )
306306
{
307307
lstCoordinateSystems->setCurrentItem( nodes.first() );
308-
lstCoordinateSystems->scrollToItem( nodes.first() );
309308
}
310309
else // unselect the selected item to avoid confusing the user
311310
{
@@ -344,7 +343,6 @@ void QgsProjectionSelector::applyAuthIDSelection()
344343
if ( nodes.count() > 0 )
345344
{
346345
lstCoordinateSystems->setCurrentItem( nodes.first() );
347-
lstCoordinateSystems->scrollToItem( nodes.first() );
348346
}
349347
else // unselect the selected item to avoid confusing the user
350348
{
@@ -367,7 +365,6 @@ void QgsProjectionSelector::applyCRSIDSelection()
367365
if ( nodes.count() > 0 )
368366
{
369367
lstCoordinateSystems->setCurrentItem( nodes.first() );
370-
lstCoordinateSystems->scrollToItem( nodes.first() );
371368
}
372369
else // unselect the selected item to avoid confusing the user
373370
{
@@ -851,7 +848,7 @@ void QgsProjectionSelector::coordinateSystemSelected( QTreeWidgetItem * theItem
851848
QString myDescription;
852849
emit sridSelected( QString::number( selectedCrsId() ) );
853850
QString myProjString = selectedProj4String();
854-
lstCoordinateSystems->scrollToItem( theItem );
851+
lstCoordinateSystems->scrollToItem( theItem, QAbstractItemView::PositionAtCenter );
855852
teProjection->setText( myProjString );
856853

857854
lstRecent->clearSelection();

0 commit comments

Comments
 (0)