]> git.sesse.net Git - kdenlive/commitdiff
Pause clip monitor when doing a drag & drop from project tree, should fix:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 12 Nov 2008 09:22:18 +0000 (09:22 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 12 Nov 2008 09:22:18 +0000 (09:22 +0000)
http://www.kdenlive.org:80/mantis/view.php?id=343

svn path=/branches/KDE4/; revision=2689

src/projectlist.cpp
src/projectlist.h
src/projectlistview.cpp
src/projectlistview.h

index 49f47bccec48802763961f861262969dc990ac37..ffd93a24f90dbb5ff44edf85792df16e98fefe96 100644 (file)
@@ -112,6 +112,7 @@ ProjectList::ProjectList(QWidget *parent)
 
     connect(listView, SIGNAL(itemSelectionChanged()), this, SLOT(slotClipSelected()));
     connect(listView, SIGNAL(focusMonitor()), this, SLOT(slotClipSelected()));
+    connect(listView, SIGNAL(pauseMonitor()), this, SLOT(slotPauseMonitor()));
     connect(listView, SIGNAL(requestMenu(const QPoint &, QTreeWidgetItem *)), this, SLOT(slotContextMenu(const QPoint &, QTreeWidgetItem *)));
     connect(listView, SIGNAL(addClip()), this, SLOT(slotAddClip()));
     connect(listView, SIGNAL(addClip(QUrl, const QString &)), this, SLOT(slotAddClip(QUrl, const QString &)));
@@ -164,6 +165,10 @@ void ProjectList::slotClipSelected() {
     }
 }
 
+void ProjectList::slotPauseMonitor() {
+    if (m_render) m_render->pause();
+}
+
 void ProjectList::slotUpdateClipProperties(const QString &id, QMap <QString, QString> properties) {
     ProjectItem *item = getItemById(id);
     if (item) {
index c5a116f2767ffb9f952e29cfca1c9a87d9d77033..8130148f03cf740d2e858316e294dab76a135fcb 100644 (file)
@@ -164,6 +164,7 @@ private slots:
     void slotProcessNextClipInQueue();
     void slotProcessNextThumbnail();
     void slotCheckForEmptyQueue();
+    void slotPauseMonitor();
     //void slotShowMenu(const QPoint &pos);
 
 signals:
index d7de11cce011aa95489109d525a23744ae22554f..08bc3d654f40a387403f7330485e4ecdc424f783 100644 (file)
@@ -206,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()
@@ -254,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 {
index b30e7dc506ae88a317e28513e0540d8c5041c0e7..a8b23fe5cb7582326ddb2558a94968cf04127565 100644 (file)
@@ -60,6 +60,7 @@ signals:
     void addClip(QUrl, const QString &);
     void showProperties(DocClipBase *);
     void focusMonitor();
+    void pauseMonitor();
 };
 
 #endif