author | zautrix <zautrix> | 2005-08-23 21:48:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-23 21:48:53 (UTC) |
commit | 2acca9aff5bd651923b5d728712a0fd80b3d54e9 (patch) (unidiff) | |
tree | c2113d441908520d86902a8a9fade08eb05ee0d0 /kaddressbook/views | |
parent | 6f5464760f5fb1e4c13027464cfe4943b85d29a0 (diff) | |
download | kdepimpi-2acca9aff5bd651923b5d728712a0fd80b3d54e9.zip kdepimpi-2acca9aff5bd651923b5d728712a0fd80b3d54e9.tar.gz kdepimpi-2acca9aff5bd651923b5d728712a0fd80b3d54e9.tar.bz2 |
fastload fixes
-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 | |||
@@ -325,28 +325,30 @@ void KAddressBookTableView::refresh(QString uid) | |||
325 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 325 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
326 | continue; | 326 | continue; |
327 | ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); | 327 | ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); |
328 | if ( (*it).uid() == currentUID ) | 328 | if ( (*it).uid() == currentUID ) |
329 | currentItem = item; | 329 | currentItem = item; |
330 | else if ( (*it).uid() == nextUID && !currentItem ) | 330 | else if ( (*it).uid() == nextUID && !currentItem ) |
331 | currentItem = item; | 331 | currentItem = item; |
332 | } | 332 | } |
333 | 333 | ||
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 |
344 | ContactListViewItem *ceItem; | 346 | ContactListViewItem *ceItem; |
345 | QListViewItemIterator it( mListView ); | 347 | QListViewItemIterator it( mListView ); |
346 | while ( it.current() ) { | 348 | while ( it.current() ) { |
347 | #ifndef KAB_EMBEDDED | 349 | #ifndef KAB_EMBEDDED |
348 | ceItem = dynamic_cast<ContactListViewItem*>( it.current() ); | 350 | ceItem = dynamic_cast<ContactListViewItem*>( it.current() ); |
349 | #else //KAB_EMBEDDED | 351 | #else //KAB_EMBEDDED |
350 | ceItem = (ContactListViewItem*)( it.current() ); | 352 | ceItem = (ContactListViewItem*)( it.current() ); |
351 | #endif //KAB_EMBEDDED | 353 | #endif //KAB_EMBEDDED |
352 | 354 | ||