diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2017-07-02 15:31:11 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2017-07-02 15:31:22 +0200 |
commit | bcd361a8207843d17ae08180a8ec3446e8de888f (patch) | |
tree | 914967ab421bf7afa1448dd150456a62cf66a841 /src | |
parent | 35fd726141b48726e6076f5d13872fc90af797a5 (diff) | |
download | tqt3-bcd361a8207843d17ae08180a8ec3446e8de888f.tar.gz tqt3-bcd361a8207843d17ae08180a8ec3446e8de888f.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>
(cherry picked from commit 5b1f451dd66adcc83b49001e56d79ea06163a1b2)
Diffstat (limited to 'src')
-rw-r--r-- | src/iconview/qiconview.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/iconview/qiconview.cpp b/src/iconview/qiconview.cpp index cd7ad4d03..d509d302e 100644 --- a/src/iconview/qiconview.cpp +++ b/src/iconview/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(); } |