summaryrefslogtreecommitdiffstats
path: root/konqueror/listview
diff options
context:
space:
mode:
Diffstat (limited to 'konqueror/listview')
-rw-r--r--konqueror/listview/konq_listview.cc28
-rw-r--r--konqueror/listview/konq_listviewwidget.cc6
2 files changed, 23 insertions, 11 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();
diff --git a/konqueror/listview/konq_listviewwidget.cc b/konqueror/listview/konq_listviewwidget.cc
index b7dd24c4b..4c1198325 100644
--- a/konqueror/listview/konq_listviewwidget.cc
+++ b/konqueror/listview/konq_listviewwidget.cc
@@ -987,7 +987,7 @@ void KonqBaseListViewWidget::selectedItems( TQPtrList<KonqBaseListViewItem> *_li
{
iterator it = begin();
for ( ; it != end(); it++ )
- if ( it->isSelected() )
+ if ( it->isVisible() && it->isSelected() )
_list->append( &*it );
}
@@ -1008,7 +1008,7 @@ KFileItemList KonqBaseListViewWidget::selectedFileItems()
KFileItemList list;
iterator it = begin();
for ( ; it != end(); it++ )
- if ( it->isSelected() )
+ if ( it->isVisible() && it->isSelected() )
list.append( it->item() );
return list;
}
@@ -1019,7 +1019,7 @@ KURL::List KonqBaseListViewWidget::selectedUrls( bool mostLocal )
KURL::List list;
iterator it = begin();
for ( ; it != end(); it++ )
- if ( it->isSelected() )
+ if ( it->isVisible() && it->isSelected() )
list.append( mostLocal ? it->item()->mostLocalURL( dummy ) : it->item()->url() );
return list;
}