]> git.sesse.net Git - kdenlive/blobdiff - src/clipdurationdialog.cpp
Fix adjusting position with clip dialog (double click on clip)
[kdenlive] / src / clipdurationdialog.cpp
index 5f144bdc512a361a4b53683e1d778fb6506f0f19..cfcef5e6cfdc9e8910b679e2fe442afb8f2e7f5a 100644 (file)
@@ -23,6 +23,7 @@
 #include "kdenlivesettings.h"
 
 #include <KDebug>
+#include <KMessageBox>
 
 #include <QWheelEvent>
 
@@ -80,9 +81,9 @@ void ClipDurationDialog::slotCheckStart()
     int dur = m_tc.getFrameCount(m_view.clip_duration->text(), m_fps);
     GenTime start(pos, m_fps);
     GenTime duration(dur, m_fps);
-    if (start < m_min) {
+    if (m_min != GenTime() && start < m_min) {
         m_view.clip_position->setText(m_tc.getTimecode(m_min, m_fps));
-    } else if (start + duration > m_max) {
+    } else if (m_max != GenTime() && start + duration > m_max) {
         m_view.clip_position->setText(m_tc.getTimecode(m_max - duration, m_fps));
     }
 }