]> git.sesse.net Git - kdenlive/blobdiff - src/monitormanager.cpp
* Fix possible crash when creating new document
[kdenlive] / src / monitormanager.cpp
index a0ed893a012e1d6f92433d3b9cfd993f8221c37b..00515de5fda074295e45b5db5963eb05a04d3956 100644 (file)
 #include <QObject>
 #include <QTimer>
 
-#include "monitormanager.h"
 #include <mlt++/Mlt.h>
 
+#include "monitormanager.h"
+#include "kdenlivesettings.h"
+
 MonitorManager::MonitorManager(QWidget *parent)
         : QObject(parent) {
 }
@@ -77,6 +79,16 @@ void MonitorManager::slotPlay() {
     else m_projectMonitor->slotPlay();
 }
 
+void MonitorManager::slotPlayZone() {
+    if (m_clipMonitor->isActive()) m_clipMonitor->slotPlayZone();
+    else m_projectMonitor->slotPlayZone();
+}
+
+void MonitorManager::slotLoopZone() {
+    if (m_clipMonitor->isActive()) m_clipMonitor->slotLoopZone();
+    else m_projectMonitor->slotLoopZone();
+}
+
 void MonitorManager::slotRewind(double speed) {
     if (m_clipMonitor->isActive()) m_clipMonitor->slotRewind(speed);
     else m_projectMonitor->slotRewind(speed);
@@ -119,7 +131,7 @@ void MonitorManager::slotEnd() {
 
 void MonitorManager::resetProfiles(Timecode tc) {
     m_timecode = tc;
-    slotResetProfiles();
+    QTimer::singleShot(300, this, SLOT(slotResetProfiles()));
 }
 
 void MonitorManager::slotResetProfiles() {