--- a/gssettingsuis/Gs/GSFramework/src/GSParentContainer.cpp Tue Feb 02 00:22:03 2010 +0200
+++ b/gssettingsuis/Gs/GSFramework/src/GSParentContainer.cpp Fri Feb 19 23:06:10 2010 +0200
@@ -839,11 +839,11 @@
//Get the exact position of listbox.
// -----------------------------------------------------------------------------
//
-void CGSParentContainer::GetPositionL(RArray<TInt>& posArray)
+void CGSParentContainer::GetPositionL(RArray<TInt>& aPosition)
{
- posArray.AppendL(iListBox->CurrentItemIndex());
- posArray.AppendL(iListBox->View()->ItemOffsetInPixels());
- posArray.AppendL(iListBox->View()->TopItemIndex());
+ aPosition.AppendL(iListBox->CurrentItemIndex());
+ aPosition.AppendL(iListBox->View()->ItemOffsetInPixels());
+ aPosition.AppendL(iListBox->View()->TopItemIndex());
return;
}
@@ -853,17 +853,23 @@
//Get the exact position of listbox.
// -----------------------------------------------------------------------------
//
-void CGSParentContainer::SetPosition(const RArray<TInt>& pos, TBool aChangeMode)
+void CGSParentContainer::SetPosition(const RArray<TInt>& aPosition, TBool aChangeMode)
{
- iListBox->SetCurrentItemIndex(pos.operator[](0));
- iListBox->View()->SetItemOffsetInPixels(pos.operator[](1));
- if (aChangeMode)
- {
- iListBox->View()->VerticalMoveToItemL(pos.operator[](0), CListBoxView::ESingleSelection);
- }
- else
- {
- iListBox->View()->SetTopItemIndex(pos.operator[](2));
- }
- }
+ if ( aPosition.operator[](0) >= 0 )
+ {
+ iListBox->SetCurrentItemIndex( aPosition.operator[](0) );
+ }
+
+ //iListBox->View()->SetItemOffsetInPixels( aPosition.operator[](1) );
+ if (aChangeMode)
+ {
+ iListBox->View()->VerticalMoveToItemL( aPosition.operator[](0),
+ CListBoxView::ESingleSelection );
+ }
+ else
+ {
+ iListBox->View()->SetItemOffsetInPixels( aPosition.operator[](1) );
+ iListBox->View()->SetTopItemIndex( aPosition.operator[](2) );
+ }
+ }
//End of File