Diffstat (limited to 'core/pim/addressbook/ablabel.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/ablabel.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/pim/addressbook/ablabel.cpp b/core/pim/addressbook/ablabel.cpp index 6d8de91..1914f71 100644 --- a/core/pim/addressbook/ablabel.cpp +++ b/core/pim/addressbook/ablabel.cpp @@ -71,10 +71,13 @@ OContact AbLabel::currentEntry() bool AbLabel::selectContact( int UID ) { - for ( m_itCurContact = m_viewList.begin(); m_itCurContact != m_viewList.end(); ++m_itCurContact){ - if ( (*m_itCurContact).uid() == UID ) + for ( int r = 0; r < m_viewList.count(); ++r ) { + if ( m_viewList.uidAt( r ) == UID ){ + m_itCurContact.setCurrent( r ); break; } + } + sync(); return true; |