diff -r a6539d1e8e43 -r 34879f5cfc63 phonebookui/Phonebook2/UIControls/src/CPbk2FetchDlg.cpp --- 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 )); + } } // --------------------------------------------------------------------------