gssettingsuis/Gs/GSFramework/src/GSParentContainer.cpp
branchRCL_3
changeset 17 3b47783fdf16
parent 14 9941bcf99348
child 20 3b67655da2cc
equal deleted inserted replaced
16:8fcb49b86877 17:3b47783fdf16
    18 // INCLUDE FILES
    18 // INCLUDE FILES
    19 #include    <gsparentcontainer.h>
    19 #include    <gsparentcontainer.h>
    20 #include    <gsparentplugin.h>
    20 #include    <gsparentplugin.h>
    21 #include    <gsplugininterface.h>
    21 #include    <gsplugininterface.h>
    22 #include    "GsLogger.h"
    22 #include    "GsLogger.h"
    23 #include    <GSParentPluginRsc.rsg>
    23 #include    <gsparentpluginrsc.rsg>
    24 #include    <gsfwviewuids.h>
    24 #include    <gsfwviewuids.h>
    25 #include    "GSBaseDocument.h"
    25 #include    "GSBaseDocument.h"
    26 #include    <mgswatchdog.h>
    26 #include    <mgswatchdog.h>
    27 
    27 
    28 #include    <AknIconArray.h>  //for loading icons
    28 #include    <AknIconArray.h>  //for loading icons
   857 //Restore the exact position of listbox.
   857 //Restore the exact position of listbox.
   858 // -----------------------------------------------------------------------------
   858 // -----------------------------------------------------------------------------
   859 //
   859 //
   860 void CGSParentContainer::RestoreListBoxPositionL( const CGSParentPlugin::TListBoxPosition& aPosition, TBool aScreenModeChanged )
   860 void CGSParentContainer::RestoreListBoxPositionL( const CGSParentPlugin::TListBoxPosition& aPosition, TBool aScreenModeChanged )
   861 	{
   861 	{
   862     if ( aPosition.iCurrentItemIndex >= 0 )
   862 	if( iListBox->View()->BottomItemIndex()>= aPosition.iCurrentItemIndex )
       
   863 		
       
   864 		{
       
   865 		
       
   866  		if ( aPosition.iCurrentItemIndex >= 0 )
   863         {
   867         {
   864         iListBox->SetCurrentItemIndex( aPosition.iCurrentItemIndex );
   868         iListBox->SetCurrentItemIndex( aPosition.iCurrentItemIndex );
   865         }
   869         }
   866     
   870     
   867     if ( aScreenModeChanged )
   871     if ( aScreenModeChanged )
   872     else
   876     else
   873         {
   877         {
   874         iListBox->View()->SetItemOffsetInPixels( aPosition.iItemOffsetInPixels );
   878         iListBox->View()->SetItemOffsetInPixels( aPosition.iItemOffsetInPixels );
   875         iListBox->View()->SetTopItemIndex( aPosition.iTopItemIndex );
   879         iListBox->View()->SetTopItemIndex( aPosition.iTopItemIndex );
   876         }
   880         }
       
   881 		}
   877     }
   882     }
   878 //End of File
   883 //End of File