uifw/EikStd/coctlsrc/EIKLBV.CPP
branchRCL_3
changeset 8 71dd06cfe933
parent 5 aabf2c525e0f
child 10 3d340a0166ff
--- a/uifw/EikStd/coctlsrc/EIKLBV.CPP	Wed Mar 31 21:59:52 2010 +0300
+++ b/uifw/EikStd/coctlsrc/EIKLBV.CPP	Wed Apr 14 16:14:00 2010 +0300
@@ -815,6 +815,11 @@
 	        }
 	    else // items will get redrawn anyway
 	        {
+            // As the iVerticalOffset is changed in CalcNewTopItemIndexSoItemIsVisible(),
+            // and ScrollToMakeItemVisible() will call the CalcNewTopItemIndexSoItemIsVisible() again,
+            // which will use iVerticalOffset to do some judgementes,
+            // we must set iVerticalOffset back to original value.
+            iVerticalOffset = oldVerticalOffset;
 	        ScrollToMakeItemVisible(iCurrentItemIndex);
 	        }
         UpdateSelectionL(aSelectionMode);
@@ -1187,6 +1192,12 @@
 		newTopItemIndex = aItemIndex;
 	else if (aItemIndex > iBottomItemIndex)
 		newTopItemIndex = aItemIndex - numItemsThatFitInRect + 1;
+    else if ( ( iVerticalOffset < 0 )
+            && ( aItemIndex == iBottomItemIndex )
+            && ( 0 == iViewRect.Height() % iItemHeight ) )
+        {
+        newTopItemIndex += 1;
+        }
 
 	if (!ITEM_EXISTS_ONCE(newTopItemIndex) && newTopItemIndex != 0 )
 		{ // if application fails to call HandleItemAdditionL(), we might go here.