]> git.sesse.net Git - kdenlive/commitdiff
Fix "insert space" crashing on last track
authorTill Theato <root@ttill.de>
Sat, 8 May 2010 19:01:24 +0000 (19:01 +0000)
committerTill Theato <root@ttill.de>
Sat, 8 May 2010 19:01:24 +0000 (19:01 +0000)
(also: http://kdenlive.org/mantis/view.php?id=1482)

svn path=/trunk/kdenlive/; revision=4422

src/customtrackview.cpp

index 8e931d50edb0e245f4d67edeb7cddf6b2ffdd74b..9afe72eb7f67132b6bf30665fa511af1ecc2c2ed 100644 (file)
@@ -2745,7 +2745,7 @@ void CustomTrackView::slotInsertSpace()
         pos = GenTime((int)(mapToScene(m_menuPosition).x()), m_document->fps());
         track = (int)(mapToScene(m_menuPosition).y() / m_tracksHeight) + 1;
     }
-    SpacerDialog d(GenTime(65, m_document->fps()), m_document->timecode(), track, m_document->tracksCount(), this);
+    SpacerDialog d(GenTime(65, m_document->fps()), m_document->timecode(), track, m_document->tracksCount() + 1, this);
     if (d.exec() != QDialog::Accepted) return;
     GenTime spaceDuration = d.selectedDuration();
     track = d.selectedTrack();