phonebookui/Phonebook2/UIControls/src/CPbk2FetchDlg.cpp
branchRCL_3
changeset 45 34879f5cfc63
parent 26 0d28c1c5b6dd
child 58 d4f567ce2e7c
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2FetchDlg.cpp	Wed Jun 09 09:26:27 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2FetchDlg.cpp	Mon Jun 21 15:24:27 2010 +0300
@@ -717,16 +717,20 @@
 // CPbk2FetchDlg::FetchDlgPageChangedL
 // --------------------------------------------------------------------------
 //
-void CPbk2FetchDlg::FetchDlgPageChangedL( MPbk2FetchDlgPage& /*aPage*/ )
+void CPbk2FetchDlg::FetchDlgPageChangedL( MPbk2FetchDlgPage& aPage )
     {
-    // An view event burst from VPbk results this function being called
-    // several times a row. It is not meaningful to restore selections
-    // every time, but instead wait for a while and restore the selections
-    // after all events have been received. Hence the idle object is used.
     delete iSelectionRestorer;
     iSelectionRestorer = NULL;
-    iSelectionRestorer = CIdle::NewL( CActive::EPriorityIdle );
-    iSelectionRestorer->Start( TCallBack( RestoreSelections, this ));
+
+    if ( aPage.DlgPageReady() )
+        {
+        // An view event burst from VPbk results this function being called
+        // several times a row. It is not meaningful to restore selections
+        // every time, but inste ad wait for a while and restore the selections
+        // after all events have been received. Hence the idle object is used.
+        iSelectionRestorer = CIdle::NewL( CActive::EPriorityIdle );
+        iSelectionRestorer->Start( TCallBack( RestoreSelections, this ));
+        }
     }
 
 // --------------------------------------------------------------------------