Commit 032e0d7c authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

small project tree cleanup (drag & drop)

svn path=/trunk/kdenlive/; revision=4607
parent d6d2992f
......@@ -183,14 +183,6 @@ void ProjectListView::mouseDoubleClickEvent(QMouseEvent * event)
emit showProperties(item->referencedClip());
}
// virtual
void ProjectListView::dragEnterEvent(QDragEnterEvent *event)
{
if (event->mimeData()->hasUrls() || event->mimeData()->hasText()) {
kDebug() << "//////////////// DRAG ENTR OK";
}
event->acceptProposedAction();
}
// virtual
void ProjectListView::dropEvent(QDropEvent *event)
......@@ -211,6 +203,7 @@ void ProjectListView::dropEvent(QDropEvent *event)
emit addClip(event->mimeData()->urls(), groupName, groupId);
event->setDropAction(Qt::CopyAction);
event->accept();
QTreeWidget::dropEvent(event);
return;
} else if (event->mimeData()->hasFormat("kdenlive/producerslist")) {
if (item) {
......@@ -255,6 +248,7 @@ void ProjectListView::dropEvent(QDropEvent *event)
emit addClipCut(list.at(0), list.at(1).toInt(), list.at(2).toInt());
}
event->acceptProposedAction();
QTreeWidget::dropEvent(event);
}
// virtual
......@@ -343,10 +337,11 @@ void ProjectListView::mouseMoveEvent(QMouseEvent *event)
}
// virtual
void ProjectListView::dragLeaveEvent(QDragLeaveEvent *)
void ProjectListView::dragLeaveEvent(QDragLeaveEvent *event)
{
// stop playing because we get a crash otherwise when fetching the thumbnails
emit pauseMonitor();
QTreeWidget::dragLeaveEvent(event);
}
QStringList ProjectListView::mimeTypes() const
......
......@@ -43,7 +43,6 @@ protected:
virtual void mousePressEvent(QMouseEvent *event);
virtual void mouseReleaseEvent(QMouseEvent *event);
virtual void mouseMoveEvent(QMouseEvent *event);
virtual void dragEnterEvent(QDragEnterEvent *event);
virtual void dropEvent(QDropEvent *event);
virtual QStringList mimeTypes() const;
virtual Qt::DropActions supportedDropActions() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment