Diffstat (limited to 'kaddressbook/views/kaddressbooktableview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/views/kaddressbooktableview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp index 02fc40a..272f2eb 100644 --- a/kaddressbook/views/kaddressbooktableview.cpp +++ b/kaddressbook/views/kaddressbooktableview.cpp | |||
@@ -334,10 +334,12 @@ void KAddressBookTableView::refresh(QString uid) | |||
334 | // Sometimes the background pixmap gets messed up when we add lots | 334 | // Sometimes the background pixmap gets messed up when we add lots |
335 | // of items. | 335 | // of items. |
336 | mListView->repaint(); | 336 | mListView->repaint(); |
337 | 337 | if ( !currentItem ) | |
338 | currentItem = (ContactListViewItem *)mListView->firstChild(); | ||
338 | if ( currentItem ) { | 339 | if ( currentItem ) { |
339 | mListView->setCurrentItem( currentItem ); | 340 | mListView->setCurrentItem( currentItem ); |
340 | mListView->ensureItemVisible( currentItem ); | 341 | mListView->ensureItemVisible( currentItem ); |
342 | mListView->setSelected( currentItem, true ); | ||
341 | } | 343 | } |
342 | } else { | 344 | } else { |
343 | // Only need to update on entry. Iterate through and try to find it | 345 | // Only need to update on entry. Iterate through and try to find it |