uifw/ganes/src/HgScrollBufferManager.cpp
branchRCL_3
changeset 4 8ca85d2f0db7
parent 0 2f259fa3e83a
equal deleted inserted replaced
0:2f259fa3e83a 4:8ca85d2f0db7
   164 // CHgScrollBufferManager::SetPosition()
   164 // CHgScrollBufferManager::SetPosition()
   165 // -----------------------------------------------------------------------------
   165 // -----------------------------------------------------------------------------
   166 //
   166 //
   167 void CHgScrollBufferManager::SetPosition( TInt aIndex )
   167 void CHgScrollBufferManager::SetPosition( TInt aIndex )
   168     {
   168     {
       
   169     // If all the items fit in the buffer no need to move the buffer
       
   170     if(iTotalCount <= iBufferSize) return;
       
   171     
   169     TBool forceUpdate = EFalse;
   172     TBool forceUpdate = EFalse;
   170     aIndex -= iBufferSize / 2; // normalize index to Buffer start
   173     aIndex -= iBufferSize / 2; // normalize index to Buffer start
   171     
   174     
   172     if(aIndex < 0)
   175     if(aIndex < 0)
   173         {
   176         {