IconView: Deselect items that are hidden by the filter

during selectAll and invertSelection
This resolves bug 2750

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 057d9fe7a4)
r14.0.x
Slávek Banko 7 years ago
parent 47690cd141
commit ad6af17aea

@ -3872,11 +3872,11 @@ void QIconView::selectAll( bool select )
rr = rr.unite( item->rect() );
changed = TRUE;
}
else {
if ( FALSE != item->isSelected() ) {
item->setSelected( FALSE, TRUE );
changed = TRUE;
}
}
else {
if ( FALSE != item->isSelected() ) {
item->setSelected( FALSE, TRUE );
changed = TRUE;
}
}
}
@ -3906,8 +3906,16 @@ void QIconView::invertSelection()
bool b = signalsBlocked();
blockSignals( TRUE );
QIconViewItem *item = d->firstItem;
for ( ; item; item = item->next )
item->setSelected( !item->isSelected(), TRUE );
for ( ; item; item = item->next ) {
if (item->isVisible()) {
item->setSelected( !item->isSelected(), TRUE );
}
else {
if ( FALSE != item->isSelected() ) {
item->setSelected( FALSE, TRUE );
}
}
}
blockSignals( b );
emit selectionChanged();
}

Loading…
Cancel
Save