summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-07-02 15:31:11 +0200
committerSlávek Banko <slavek.banko@axis.cz>2017-07-02 15:31:11 +0200
commit5b1f451dd66adcc83b49001e56d79ea06163a1b2 (patch)
tree1355dddf75d3cc3ff3837dd29f3c9669cfe45d21 /src/widgets
parent9bbdfea568b8ae52b76aa8366612130403158320 (diff)
downloadtqt3-5b1f451dd66adcc83b49001e56d79ea06163a1b2.tar.gz
tqt3-5b1f451dd66adcc83b49001e56d79ea06163a1b2.zip
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>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/qiconview.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/widgets/qiconview.cpp b/src/widgets/qiconview.cpp
index 28c8d8570..b7305d038 100644
--- a/src/widgets/qiconview.cpp
+++ b/src/widgets/qiconview.cpp
@@ -3872,11 +3872,11 @@ void TQIconView::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 TQIconView::invertSelection()
bool b = signalsBlocked();
blockSignals( TRUE );
TQIconViewItem *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();
}