When performing Insert with no target track, simply insert blank space

Ref: T1961
parent fa8a7260
...@@ -7975,10 +7975,6 @@ void CustomTrackView::insertZone(TimelineMode::EditMode sceneMode, const QString ...@@ -7975,10 +7975,6 @@ void CustomTrackView::insertZone(TimelineMode::EditMode sceneMode, const QString
extractAudio = false; extractAudio = false;
if (m_timeline->videoTarget == -1 || m_timeline->getTrackInfo(m_timeline->videoTarget).isLocked) if (m_timeline->videoTarget == -1 || m_timeline->getTrackInfo(m_timeline->videoTarget).isLocked)
extractVideo = false; extractVideo = false;
if (!extractAudio && !extractVideo) {
emit displayMessage(i18n("Please select target track(s) to perform operation"), ErrorMessage);
return;
}
} }
else if (m_timeline->getTrackInfo(m_selectedTrack).isLocked) { else if (m_timeline->getTrackInfo(m_selectedTrack).isLocked) {
// Cannot perform an Extract operation on a locked track // Cannot perform an Extract operation on a locked track
...@@ -8008,16 +8004,17 @@ void CustomTrackView::insertZone(TimelineMode::EditMode sceneMode, const QString ...@@ -8008,16 +8004,17 @@ void CustomTrackView::insertZone(TimelineMode::EditMode sceneMode, const QString
if (KdenliveSettings::splitaudio()) { if (KdenliveSettings::splitaudio()) {
if (extractVideo) { if (extractVideo) {
info.track = m_timeline->videoTarget; info.track = m_timeline->videoTarget;
if (extractAudio) { if (extractAudio) {
new AddTimelineClipCommand(this, clipId, info, EffectsList(), PlaylistState::Original, true, false, addCommand); new AddTimelineClipCommand(this, clipId, info, EffectsList(), PlaylistState::Original, true, false, addCommand);
} else { } else {
new AddTimelineClipCommand(this, clipId, info, EffectsList(), PlaylistState::VideoOnly, true, false, addCommand); new AddTimelineClipCommand(this, clipId, info, EffectsList(), PlaylistState::VideoOnly, true, false, addCommand);
} }
} } else if (extractAudio) {
else {
// Extract audio only // Extract audio only
info.track = m_timeline->audioTarget; info.track = m_timeline->audioTarget;
new AddTimelineClipCommand(this, clipId, info, EffectsList(), PlaylistState::AudioOnly, true, false, addCommand); new AddTimelineClipCommand(this, clipId, info, EffectsList(), PlaylistState::AudioOnly, true, false, addCommand);
} else {
emit displayMessage(i18n("No target track(s) selected"), InformationMessage);
} }
} }
else { else {
......
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