|
|
|
@ -5350,9 +5350,17 @@ void QListView::selectAll( bool select )
|
|
|
|
|
QListViewItemIterator it( this );
|
|
|
|
|
while ( it.current() ) {
|
|
|
|
|
QListViewItem *i = it.current();
|
|
|
|
|
if ( (bool)i->selected != select ) {
|
|
|
|
|
i->setSelected( select );
|
|
|
|
|
anything = TRUE;
|
|
|
|
|
if ( i->isVisible()) {
|
|
|
|
|
if ( (bool)i->selected != select ) {
|
|
|
|
|
i->setSelected( select );
|
|
|
|
|
anything = TRUE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if ( (bool)i->selected != FALSE ) {
|
|
|
|
|
i->setSelected( FALSE );
|
|
|
|
|
anything = TRUE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
++it;
|
|
|
|
|
}
|
|
|
|
@ -5382,8 +5390,16 @@ void QListView::invertSelection()
|
|
|
|
|
bool b = signalsBlocked();
|
|
|
|
|
blockSignals( TRUE );
|
|
|
|
|
QListViewItemIterator it( this );
|
|
|
|
|
for ( ; it.current(); ++it )
|
|
|
|
|
it.current()->setSelected( !it.current()->isSelected() );
|
|
|
|
|
for ( ; it.current(); ++it ) {
|
|
|
|
|
if (it.current()->isVisible()) {
|
|
|
|
|
it.current()->setSelected( !it.current()->isSelected() );
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if ( FALSE != it.current()->isSelected() ) {
|
|
|
|
|
it.current()->setSelected( FALSE );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
blockSignals( b );
|
|
|
|
|
emit selectionChanged();
|
|
|
|
|
triggerUpdate();
|
|
|
|
|