Minor code clean up.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 98e72add31)
v3.5.13-sru
Michele Calgaro 11 years ago committed by Slávek Banko
parent 61d4cd95ac
commit 26d879762a

@ -91,15 +91,11 @@ TQIconView *KIconViewSearchLine::iconView() const
*****************************************************************************/ *****************************************************************************/
void KIconViewSearchLine::updateSearch( const TQString &s ) void KIconViewSearchLine::updateSearch( const TQString &s )
{ {
long original_count;
int original_hiddenListChanged;
if( ! d->iconView ) if( ! d->iconView )
return; // disabled return;
TQString search = d->search = s.isNull() ? text() : s; d->search = s.isNull() ? text() : s;
TQIconViewItem *currentItem = d->iconView->currentItem(); TQIconViewItem *currentItem = d->iconView->currentItem();
TQIconViewItem *item = NULL; TQIconViewItem *item = NULL;
// Remove Non-Matching items, add them to the hidden list // Remove Non-Matching items, add them to the hidden list
@ -107,7 +103,7 @@ void KIconViewSearchLine::updateSearch( const TQString &s )
while ( i != NULL ) { while ( i != NULL ) {
item = i; item = i;
i = i->nextItem(); // Point to next, otherwise will loose it. i = i->nextItem(); // Point to next, otherwise will loose it.
if ( ! itemMatches( item, search ) ) { if ( ! itemMatches( item, d->search ) ) {
hideItem( item ); hideItem( item );
if ( item == currentItem ) if ( item == currentItem )
@ -118,8 +114,7 @@ void KIconViewSearchLine::updateSearch( const TQString &s )
} }
} }
d->iconView->sort(); d->iconView->sort(); // This also arranges items in grid
//d->iconView->arrangeItemsInGrid(true); // Already done inside the sort() routine
if ( currentItem != NULL ) if ( currentItem != NULL )
d->iconView->ensureItemVisible( currentItem ); d->iconView->ensureItemVisible( currentItem );

Loading…
Cancel
Save