Commit 1ffc0b61 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle

Ensure audio track is inserted at correct position when no previous audio exists

parent 340c9ceb
......@@ -2251,7 +2251,7 @@ bool TimelineModel::requestTrackInsertion(int position, int &id, const QString &
// TODO: make sure we disable overlayTrack before inserting a track
qDebug()<<"=== REQUESTING TRACK INSERTION AT: "<<position;
if (position == -1) {
position = (int)(m_allTracks.size());
position = audioTrack ? 0 : (int)(m_allTracks.size());
}
if (position < 0 || position > (int)m_allTracks.size()) {
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment