From e69e2fb93014948e7734e4828330455b2a15fe7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 7 Jul 2017 03:00:39 +0200 Subject: Konqueror: Do not include items that are selected but hidden by the filter for operations such as copying, moving, deleting,... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- libkonq/konq_iconviewwidget.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libkonq') diff --git a/libkonq/konq_iconviewwidget.cc b/libkonq/konq_iconviewwidget.cc index 96e04df29..b51c8502d 100644 --- a/libkonq/konq_iconviewwidget.cc +++ b/libkonq/konq_iconviewwidget.cc @@ -902,7 +902,7 @@ KFileItemList KonqIconViewWidget::selectedFileItems() TQIconViewItem *it = firstItem(); for (; it; it = it->nextItem() ) - if ( it->isSelected() ) { + if ( it->isVisible() && it->isSelected() ) { KFileItem *fItem = (static_cast(it))->item(); lstItems.append( fItem ); } @@ -969,7 +969,7 @@ KonqIconDrag * KonqIconViewWidget::konqDragObject( TQWidget * dragSource ) TQIconViewItem *primaryItem = currentItem(); // Append all items to the drag object for ( TQIconViewItem *it = firstItem(); it; it = it->nextItem() ) { - if ( it->isSelected() ) { + if ( it->isVisible() && it->isSelected() ) { if (!primaryItem) primaryItem = it; KFileItem* fileItem = (static_cast(it))->item(); @@ -1094,7 +1094,7 @@ void KonqIconViewWidget::slotSelectionChanged() for ( TQIconViewItem *it = firstItem(); it; it = it->nextItem() ) { - if ( it->isSelected() ) + if ( it->isVisible() && it->isSelected() ) { iCount++; canCopy++; @@ -1136,7 +1136,7 @@ void KonqIconViewWidget::renameSelectedItem() TQIconViewItem * item = 0L; TQIconViewItem *it = firstItem(); for (; it; it = it->nextItem() ) - if ( it->isSelected() && !item ) + if ( it->isVisible() && it->isSelected() && !item ) { item = it; break; @@ -1184,7 +1184,7 @@ KURL::List KonqIconViewWidget::selectedUrls( UrlFlags flags ) const KURL::List lstURLs; bool dummy; for ( TQIconViewItem *it = firstItem(); it; it = it->nextItem() ) - if ( it->isSelected() ) { + if ( it->isVisible() && it->isSelected() ) { KFileItem* item = (static_cast( it ))->item(); lstURLs.append( flags == MostLocalUrls ? item->mostLocalURL( dummy ) : item->url() ); } -- cgit v1.2.1