]> git.sesse.net Git - kdenlive/blobdiff - src/customtrackscene.cpp
Fix a couple of compile warnings because of unused and uninitialized variables.
[kdenlive] / src / customtrackscene.cpp
index 7a3209e42efe79ffbb8497a9807b80239f687a5f..1f8b40ae2f6de2f45f5e8483aa7c1a149b886aa7 100644 (file)
@@ -25,9 +25,9 @@
 CustomTrackScene::CustomTrackScene(KdenliveDoc *doc, QObject *parent) :
         QGraphicsScene(parent),
         m_document(doc),
-        m_scale(1.0, 1.0)
+        m_scale(1.0, 1.0),
+        m_editMode(NORMALEDIT)
 {
-    m_transitionPixmap = QPixmap(KStandardDirs::locate("appdata", "transition.png"));
 }
 
 CustomTrackScene::~CustomTrackScene()
@@ -55,18 +55,18 @@ void CustomTrackScene::setSnapList(QList <GenTime> snaps)
     m_snapPoints = snaps;
 }
 
-GenTime CustomTrackScene::previousSnapPoint(GenTime pos)
+GenTime CustomTrackScene::previousSnapPoint(GenTime pos) const
 {
     for (int i = 0; i < m_snapPoints.size(); ++i) {
         if (m_snapPoints.at(i) >= pos) {
-            if (i == 0) i = 1;
+            if (i == 0) return GenTime();
             return m_snapPoints.at(i - 1);
         }
     }
     return GenTime();
 }
 
-GenTime CustomTrackScene::nextSnapPoint(GenTime pos)
+GenTime CustomTrackScene::nextSnapPoint(GenTime pos) const
 {
     for (int i = 0; i < m_snapPoints.size(); ++i) {
         if (m_snapPoints.at(i) > pos) {
@@ -92,4 +92,19 @@ int CustomTrackScene::tracksCount() const
     return m_document->tracksCount();
 }
 
+MltVideoProfile CustomTrackScene::profile() const
+{
+    return m_document->mltProfile();
+}
+
+void CustomTrackScene::setEditMode(EDITMODE mode)
+{
+    m_editMode = mode;
+}
+
+EDITMODE CustomTrackScene::editMode() const
+{
+    return m_editMode;
+}
+
 #include "customtrackscene.moc"