connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiContainer.cpp
branchRCL_3
changeset 15 4dc3bb0099b0
parent 4 77415202bfc8
child 19 22c3c67e5001
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiContainer.cpp	Mon Mar 15 12:42:11 2010 +0200
+++ b/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiContainer.cpp	Wed Mar 31 22:15:10 2010 +0300
@@ -104,8 +104,8 @@
     iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
     
     TInt actCount = iConnectionArray->MdcaCount() - 1;
-	
-	if ( actCount > KErrNotFound )
+    
+    if ( actCount > KErrNotFound )
 		{
 		iListBox->SetCurrentItemIndex( aSelectedItem > actCount ? actCount : aSelectedItem );	    
 		}
@@ -123,7 +123,8 @@
     SetRect( aRect );    
     ActivateL();
 
-    isWlanSupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); 
+    isWlanSupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
+    iOldConnectionCount = iConnectionArray->MdcaCount();
 
     CMUILOGGER_LEAVEFN( "CConnectionMonitorUiContainer::ConstructL" );
     }
@@ -272,6 +273,14 @@
 void CConnectionMonitorUiContainer::OnTimerEventL()
     {
     iListBox->DrawNow();
+    //Update the scrollbar only if connection count has changed
+    //
+    TInt iNewConnectionCount = iConnectionArray->MdcaCount();
+    if ( iOldConnectionCount != iNewConnectionCount )
+        {
+        iListBox->UpdateScrollBarsL();
+        }
+    iOldConnectionCount = iNewConnectionCount;
     PushAndRefreshNaviPaneL();
     }