From 06d6fd6ae517d560616d0864db29c7d8ae7a0a32 Mon Sep 17 00:00:00 2001 From: eilers Date: Sun, 09 Mar 2003 16:59:29 +0000 Subject: Fixed missing table refresh after changing the primary contact order --- (limited to 'core') diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index a829dc2..a2617fa 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp @@ -182,6 +182,12 @@ void AbTable::setContacts( const OContactAccess::List& viewList ) } +void AbTable::setOrderedList( const QValueList ordered ) +{ + intFields = ordered; +} + + bool AbTable::selectContact( int UID ) { // qWarning( "AbTable::selectContact( %d )", UID ); @@ -317,10 +323,13 @@ void AbTable::refresh() abi = static_cast( item(r, 0) ); contactItem = findContactContact( contactList[abi], r ); static_cast( item(r, 1) )->setItem( contactItem.value, abi->text() ); - if ( !contactItem.icon.isNull() ) + if ( !contactItem.icon.isNull() ){ static_cast( item(r, 1) )-> setPixmap( contactItem.icon ); - + }else{ + static_cast( item(r, 1) )-> + setPixmap( QPixmap() ); + } } resort(); setPaintingEnabled( TRUE ); diff --git a/core/pim/addressbook/abtable.h b/core/pim/addressbook/abtable.h index 4e6b294..0f7bc29 100644 --- a/core/pim/addressbook/abtable.h +++ b/core/pim/addressbook/abtable.h @@ -78,6 +78,10 @@ public: // Set the contacts shown in the table void setContacts( const OContactAccess::List& viewList ); + + // Set the list for primary contacts + void setOrderedList( const QValueList ordered ); + // Selects a contact of a specific UID bool selectContact( int UID ); diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp index 7da0992..b89b794 100644 --- a/core/pim/addressbook/abview.cpp +++ b/core/pim/addressbook/abview.cpp @@ -243,6 +243,10 @@ void AbView::setShowByLetter( char c ) void AbView::setListOrder( const QValueList& ordered ) { m_orderedFields = ordered; + if ( m_abTable ){ + m_abTable->setOrderedList( ordered ); + m_abTable->refresh(); + } updateView(); } -- cgit v0.9.0.2