]> git.sesse.net Git - kdenlive/blobdiff - src/monitor.cpp
Cleanup thumbnails (prefer QImage over QPixmap)
[kdenlive] / src / monitor.cpp
index 1090112d00ba652867d3109e2004f0d12de4d257..e994710b89aa35b1cd9c36a5a49528b4e725ed7b 100644 (file)
@@ -180,6 +180,7 @@ Monitor::Monitor(QString name, MonitorManager *manager, QString profile, QWidget
     connect(m_ruler, SIGNAL(seekRenderer(int)), this, SLOT(slotSeek(int)));
     connect(render, SIGNAL(durationChanged(int)), this, SLOT(adjustRulerSize(int)));
     connect(render, SIGNAL(rendererStopped(int)), this, SLOT(rendererStopped(int)));
+    connect(render, SIGNAL(rendererPosition(int)), this, SLOT(seekCursor(int)));
 
     if (name != "clip") {
         connect(render, SIGNAL(rendererPosition(int)), this, SIGNAL(renderPosition(int)));
@@ -502,9 +503,9 @@ void Monitor::mouseMoveEvent(QMouseEvent *event)
         data.append(list.join(";").toUtf8());
         mimeData->setData("kdenlive/clip", data);
         drag->setMimeData(mimeData);
-        QPixmap pix = m_currentClip->thumbnail();
+        /*QPixmap pix = m_currentClip->thumbnail();
         drag->setPixmap(pix);
-        drag->setHotSpot(QPoint(0, 50));
+        drag->setHotSpot(QPoint(0, 50));*/
         drag->start(Qt::MoveAction);
 
         //Qt::DropAction dropAction;
@@ -731,7 +732,6 @@ void Monitor::adjustRulerSize(int length)
 
 void Monitor::stop()
 {
-    disconnect(render, SIGNAL(rendererPosition(int)), this, SLOT(seekCursor(int)));
     if (render) render->stop();
 }
 
@@ -739,7 +739,6 @@ void Monitor::start()
 {
     if (!isVisible()) return;
     if (render) render->start();
-    connect(render, SIGNAL(rendererPosition(int)), this, SLOT(seekCursor(int)));
 }
 
 void Monitor::refreshMonitor(bool visible)
@@ -877,7 +876,10 @@ void Monitor::resetProfile(const QString &profile)
 {
     m_timePos->updateTimeCode(m_monitorManager->timecode());
     if (render == NULL) return;
-    render->resetProfile(profile);
+    if (!render->hasProfile(profile)) {
+        activateMonitor();
+        render->resetProfile(profile);
+    }
     if (m_effectWidget)
         m_effectWidget->resetProfile(render);
 }
@@ -1001,8 +1003,8 @@ void Monitor::slotEffectScene(bool show)
         emit requestFrameForAnalysis(show);
         if (show) {
             m_effectWidget->getScene()->slotZoomFit();
-            render->doRefresh();
         }
+        render->doRefresh();
     }
 }