SUIT_DataObject* obj = item->dataObject();
if ( obj ) {
// 1. check text
- update = ( item->text( 0 ) != obj->name() );
+ update = ( item->text( 0 ) != obj->name() ) || myBrowser->needToUpdateTexts( item );
+
if ( !update ) {
// 2. check pixmap (compare serialNumber()-s)
QPixmap objPix = obj->icon();
{
if ( p && needUpdate( p ) ) {
// printf( "--- needUpdate for %s = true ---\n", p->text( 0 ).latin1() );
+ myBrowser->updateText( p );
p->update();
}
}
}
}
+bool OB_Browser::needToUpdateTexts( QListViewItem* item ) const
+{
+ SUIT_DataObject* obj = dataObject( item );
+ if ( !obj )
+ return false;
+
+ for( QMap<int, int>::const_iterator it = myColumnIds.begin(); it != myColumnIds.end(); ++it )
+ if( item->text( it.data() ) != obj->text( it.key() ) )
+ return true;
+ return false;
+}
+
void OB_Browser::updateText( QListViewItem* item )
{
SUIT_DataObject* obj = dataObject( item );
void removeObject( SUIT_DataObject*, const bool = true );
void updateText( QListViewItem* );
+ bool needToUpdateTexts( QListViewItem* ) const;
DataObjectKey objectKey( QListViewItem* ) const;
DataObjectKey objectKey( SUIT_DataObject* ) const;