author | eilers <eilers> | 2003-03-09 16:59:29 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-03-09 16:59:29 (UTC) |
commit | 06d6fd6ae517d560616d0864db29c7d8ae7a0a32 (patch) (side-by-side diff) | |
tree | 36e4672fcded6fc2009a5af6a111d1d8d4dc6bb5 /core/pim/addressbook/abtable.cpp | |
parent | 77c55432622d2821023ac73f47d3215d04cc4f58 (diff) | |
download | opie-06d6fd6ae517d560616d0864db29c7d8ae7a0a32.zip opie-06d6fd6ae517d560616d0864db29c7d8ae7a0a32.tar.gz opie-06d6fd6ae517d560616d0864db29c7d8ae7a0a32.tar.bz2 |
Fixed missing table refresh after changing the primary contact order
Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
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 @@ -173,24 +173,30 @@ void AbTable::setContacts( const OContactAccess::List& viewList ) insertIntoTable( *it, row++ ); setSorting( true ); resort(); updateVisible(); setPaintingEnabled( TRUE ); } +void AbTable::setOrderedList( const QValueList<int> ordered ) +{ + intFields = ordered; +} + + bool AbTable::selectContact( int UID ) { // qWarning( "AbTable::selectContact( %d )", UID ); int rows = numRows(); AbTableItem *abi; OContact* foundContact = 0l; bool found = false; setPaintingEnabled( FALSE ); for ( int r = 0; r < rows; ++r ) { abi = static_cast<AbTableItem*>( item(r, 0) ); foundContact = &contactList[abi]; @@ -308,28 +314,31 @@ void AbTable::clear() void AbTable::refresh() { // qWarning( "void AbTable::refresh()" ); int rows = numRows(); AbTableItem *abi; ContactItem contactItem; setPaintingEnabled( FALSE ); for ( int r = 0; r < rows; ++r ) { abi = static_cast<AbTableItem*>( item(r, 0) ); contactItem = findContactContact( contactList[abi], r ); static_cast<AbTableItem*>( item(r, 1) )->setItem( contactItem.value, abi->text() ); - if ( !contactItem.icon.isNull() ) + if ( !contactItem.icon.isNull() ){ static_cast<AbTableItem*>( item(r, 1) )-> setPixmap( contactItem.icon ); - + }else{ + static_cast<AbTableItem*>( item(r, 1) )-> + setPixmap( QPixmap() ); + } } resort(); setPaintingEnabled( TRUE ); } void AbTable::keyPressEvent( QKeyEvent *e ) { char key = toupper( e->ascii() ); if ( key >= 'A' && key <= 'Z' ) moveTo( key ); |