diff options
author | Slávek Banko <[email protected]> | 2017-07-07 02:41:34 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2017-07-07 02:41:34 +0200 |
commit | 924d9936719a780488cdafecd77346c84a620c79 (patch) | |
tree | a07591b1ea52d544ebb9e40639805598461955bc /konqueror/listview/konq_listview.cc | |
parent | 50d21388fb27b915d32b406fac9e587b632413e8 (diff) | |
download | tdebase-924d9936719a780488cdafecd77346c84a620c79.tar.gz tdebase-924d9936719a780488cdafecd77346c84a620c79.zip |
Konqueror: Deselect items that are hidden by the filter during Select and Deselect
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'konqueror/listview/konq_listview.cc')
-rw-r--r-- | konqueror/listview/konq_listview.cc | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/konqueror/listview/konq_listview.cc b/konqueror/listview/konq_listview.cc index 8c9369a4c..67da49c6d 100644 --- a/konqueror/listview/konq_listview.cc +++ b/konqueror/listview/konq_listview.cc @@ -389,17 +389,22 @@ void KonqListView::slotSelect() for (KonqBaseListViewWidget::iterator it = m_pListView->begin(); it != m_pListView->end(); it++ ) { - if ((m_pListView->automaticSelection()) && (it->isSelected())) - { + if ((m_pListView->automaticSelection()) && (it->isSelected())) { it->setSelected(FALSE); //the following line is to prevent that more than one item were selected //and now get deselected and automaticSelection() was true, this shouldn't happen //but who knows, aleXXX m_pListView->deactivateAutomaticSelection(); - }; - if ( re.exactMatch( it->text(0) ) ) - it->setSelected( TRUE); - }; + } + if ( it->isVisible() ) { + if ( re.exactMatch( it->text(0) ) ) { + it->setSelected(TRUE); + } + } + else { + it->setSelected(FALSE); + } + } m_pListView->blockSignals( false ); m_pListView->deactivateAutomaticSelection(); emit m_pListView->selectionChanged(); @@ -418,9 +423,16 @@ void KonqListView::slotUnselect() m_pListView->blockSignals(TRUE); - for (KonqBaseListViewWidget::iterator it = m_pListView->begin(); it != m_pListView->end(); it++ ) - if ( re.exactMatch( it->text(0) ) ) + for (KonqBaseListViewWidget::iterator it = m_pListView->begin(); it != m_pListView->end(); it++ ) { + if ( it->isVisible() ) { + if ( re.exactMatch( it->text(0) ) ) { + it->setSelected(FALSE); + } + } + else { it->setSelected(FALSE); + } + } m_pListView->blockSignals(FALSE); m_pListView->deactivateAutomaticSelection(); |