Skip to content

Commit eb4fc90

Browse files
author
morb_au
committed
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@5626 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 46fc648 commit eb4fc90

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/widgets/projectionselector/qgsprojectionselector.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,11 @@ void QgsProjectionSelector::applySRSNameSelection()
203203
if (nodes.count() > 0)
204204
{
205205
lstCoordinateSystems->setCurrentItem(nodes.first());
206+
207+
// The following seems to be broken in Qt 4.1.0:
208+
// It only works if the widget is already visible.
209+
// (Which makes it really hard to scroll to an
210+
// item before you exec() the widget)
206211
lstCoordinateSystems->scrollToItem(nodes.first());
207212
}
208213
else // unselect the selected item to avoid confusing the user
@@ -230,6 +235,11 @@ void QgsProjectionSelector::applySRSIDSelection()
230235
if (nodes.count() > 0)
231236
{
232237
lstCoordinateSystems->setCurrentItem(nodes.first());
238+
239+
// The following seems to be broken in Qt 4.1.0:
240+
// It only works if the widget is already visible.
241+
// (Which makes it really hard to scroll to an
242+
// item before you exec() the widget)
233243
lstCoordinateSystems->scrollToItem(nodes.first());
234244
}
235245
else // unselect the selected item to avoid confusing the user
@@ -784,6 +794,11 @@ void QgsProjectionSelector::coordinateSystemSelected( QTreeWidgetItem * theItem)
784794
{
785795
myDescription+=(myProjString);
786796
}
797+
798+
// The following seems to be broken in Qt 4.1.0:
799+
// It only works if the widget is already visible.
800+
// (Which makes it really hard to scroll to an
801+
// item before you exec() the widget)
787802
lstCoordinateSystems->scrollToItem(theItem);
788803
teProjection->setText(myDescription);
789804
}

0 commit comments

Comments
 (0)