diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-05-05 01:31:49 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-05-05 01:35:26 +0200 |
commit | 8bdb01112167d8d83b75353064c3c94a1a1c27a8 (patch) | |
tree | 645079481847183d7bc4792cffc6f06a48f7608d /libkonq | |
parent | 3cce16c2543ebd7441477b466b35c89333eef28c (diff) | |
download | tdebase-8bdb01112167d8d83b75353064c3c94a1a1c27a8.tar.gz tdebase-8bdb01112167d8d83b75353064c3c94a1a1c27a8.zip |
Fix konqueror drag and drop within the same window
This resolves Bug 1451
Diffstat (limited to 'libkonq')
-rw-r--r-- | libkonq/konq_iconviewwidget.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libkonq/konq_iconviewwidget.cc b/libkonq/konq_iconviewwidget.cc index 18997a71b..a2d0c6188 100644 --- a/libkonq/konq_iconviewwidget.cc +++ b/libkonq/konq_iconviewwidget.cc @@ -1237,6 +1237,7 @@ void KonqIconViewWidget::contentsMouseMoveEvent( TQMouseEvent *e ) void KonqIconViewWidget::contentsDropEvent( TQDropEvent * ev ) { TQIconViewItem *i = findItem( ev->pos() ); + KURL::List uriList; if ( ev->source() != viewport() && !i && m_rootItem && !m_rootItem->isWritable() ) { @@ -1247,7 +1248,9 @@ void KonqIconViewWidget::contentsDropEvent( TQDropEvent * ev ) // Short-circuit TQIconView if Ctrl is pressed, so that it's possible // to drop a file into its own parent widget to copy it. if ( !i && (ev->action() == TQDropEvent::Copy || ev->action() == TQDropEvent::Link) - && ev->source() && ev->source() == viewport()) + && ev->source() && ev->source() == viewport() + && KURLDrag::decode(ev, uriList) && !uriList.isEmpty() + && uriList.first().upURL().url(1) == url().url(1)) { // First we need to call TQIconView though, to clear the drag shape bool bMovable = itemsMovable(); |