[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-1/k3b/src/data
From: Sebastian Trueg <sebastian () trueg ! de>
Date: 2003-01-31 22:23:45
[Download RAW message or body]
CVS commit by trueg:
dropping not on an item adds to root now which makes more sense than the old behaviour
M +6 -9 k3bdatadirtreeview.cpp 1.29
--- kdeextragear-1/k3b/src/data/k3bdatadirtreeview.cpp #1.28:1.29
@@ -94,5 +94,5 @@ bool K3bDataDirTreeView::acceptDrag(QDro
-void K3bDataDirTreeView::slotDropped( QDropEvent* e, QListViewItem*, QListViewItem* parentViewItem )
+void K3bDataDirTreeView::slotDropped( QDropEvent* e, QListViewItem*, QListViewItem* )
{
if( !e->isAccepted() )
@@ -101,7 +101,9 @@ void K3bDataDirTreeView::slotDropped( QD
// determine K3bDirItem to add the items to
K3bDirItem* parent = 0;
- if( K3bDataDirViewItem* dirViewItem = dynamic_cast<K3bDataDirViewItem*>( parentViewItem ) ) {
+ if( K3bDataDirViewItem* dirViewItem = dynamic_cast<K3bDataDirViewItem*>( itemAt(e->pos()) ) ) {
parent = dirViewItem->dirItem();
}
+ else
+ parent = m_doc->root();
if( parent ) {
@@ -136,10 +138,4 @@ void K3bDataDirTreeView::slotDropped( QD
}
}
-
- else if( QUriDrag::canDecode(e) ) {
- KURL::List urls;
- if( KURLDrag::decode( e, urls ) )
- emit urlsDropped( urls, parentViewItem );
- }
}
@@ -187,5 +183,6 @@ void K3bDataDirTreeView::updateContents(
if( !m_itemMap.contains(dirItem) ) {
K3bDataDirViewItem* parentViewItem = m_itemMap[dirItem->parent()];
- m_itemMap.insert( dirItem, new K3bDataDirViewItem( dirItem, parentViewItem ) );
+ K3bDataDirViewItem* newDirItem = new K3bDataDirViewItem( dirItem, parentViewItem );
+ m_itemMap.insert( dirItem, newDirItem );
}
else {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic