]> git.sesse.net Git - kdenlive/blobdiff - src/projectlistview.cpp
Improve profile selection in First run wizard
[kdenlive] / src / projectlistview.cpp
index ad60323bf1a9b33befc48a3ef6904ec7bd016018..08bc3d654f40a387403f7330485e4ecdc424f783 100644 (file)
@@ -114,7 +114,10 @@ void ProjectListView::mouseDoubleClickEvent(QMouseEvent * event) {
     if (!item) emit addClip();
     else if (item->isGroup()) {
         if ((columnAt(event->pos().x()) == 1)) QTreeWidget::mouseDoubleClickEvent(event);
-    } else emit showProperties(item->referencedClip());
+    } else {
+        if ((columnAt(event->pos().x()) == 2)) QTreeWidget::mouseDoubleClickEvent(event);
+        else emit showProperties(item->referencedClip());
+    }
 }
 
 // virtual
@@ -176,8 +179,12 @@ void ProjectListView::dropEvent(QDropEvent *event) {
                 QTreeWidgetItem *parent = it->parent();
                 if (parent/* && ((ProjectItem *) it)->clipId() < 10000*/)  {
                     kDebug() << "++ item parent: " << parent->text(1);
-                    clone = (ProjectItem*) parent->takeChild(parent->indexOfChild(it));
-                    if (clone) addTopLevelItem(clone);
+                    clone = static_cast <ProjectItem*>(parent->takeChild(parent->indexOfChild(it)));
+                    if (clone) {
+                        addTopLevelItem(clone);
+                        clone->clearProperty("groupname");
+                        clone->clearProperty("groupid");
+                    }
                 }
             }
         }
@@ -199,7 +206,7 @@ void ProjectListView::mousePressEvent(QMouseEvent *event) {
 
 // virtual
 void ProjectListView::mouseMoveEvent(QMouseEvent *event) {
-    kDebug() << "// DRAG STARTED, MOUSE MOVED: ";
+    //kDebug() << "// DRAG STARTED, MOUSE MOVED: ";
     if (!m_dragStarted) return;
 
     if ((event->pos() - m_DragStartPosition).manhattanLength()
@@ -247,14 +254,13 @@ void ProjectListView::mouseMoveEvent(QMouseEvent *event) {
 
 // virtual
 void ProjectListView::dragMoveEvent(QDragMoveEvent * event) {
-    QTreeWidgetItem * item = itemAt(event->pos());
     event->setDropAction(Qt::IgnoreAction);
-    //if (item) {
     event->setDropAction(Qt::MoveAction);
     if (event->mimeData()->hasText()) {
         event->acceptProposedAction();
     }
-    //}
+    // stop playing because we get a crash otherwise when fetching the thumbnails
+    emit pauseMonitor();
 }
 
 QStringList ProjectListView::mimeTypes() const {