summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <jb@kdenlive.org>2016-12-07 20:41:24 (GMT)
committerJean-Baptiste Mardelle <jb@kdenlive.org>2016-12-07 20:41:24 (GMT)
commitf922b5023f2f2ffdf0468d008e39932079ebc96b (patch)
treef44880483ba8e164e9e77b86acdd0db7d882432b
parentd39d1860ee3cde75c0b60ef22c45bb3acc94a4a2 (diff)
Fix split audio only working on first audio track on non automatic split mode
-rw-r--r--src/timeline/customtrackview.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/timeline/customtrackview.cpp b/src/timeline/customtrackview.cpp
index 2cba623..19939d4 100644
--- a/src/timeline/customtrackview.cpp
+++ b/src/timeline/customtrackview.cpp
@@ -6834,27 +6834,29 @@ void CustomTrackView::splitAudio(bool warn, ItemInfo info, int destTrack, QUndoC
if (!info.isValid()) {
// Operate on current selection
selection = scene()->selectedItems();
- destTrack = m_timeline->audioTarget;
if (selection.isEmpty()) {
emit displayMessage(i18n("You must select at least one clip for this action"), ErrorMessage);
if (!hasMasterCommand)
delete masterCommand;
return;
}
- } else {
- new SplitAudioCommand(this, info.track, destTrack, info.startPos, masterCommand);
- }
- for (int i = 0; i < selection.count(); ++i) {
- if (selection.at(i)->type() == AVWidget) {
- ClipItem *clip = static_cast <ClipItem *>(selection.at(i));
- if (clip->clipType() == AV || clip->clipType() == Playlist) {
- if (clip->parentItem()) {
- emit displayMessage(i18n("Cannot split audio of grouped clips"), ErrorMessage);
- } else {
- new SplitAudioCommand(this, clip->track(), destTrack, clip->startPos(), masterCommand);
+ if (KdenliveSettings::splitaudio()) {
+ destTrack = m_timeline->audioTarget;
+ }
+ for (int i = 0; i < selection.count(); ++i) {
+ if (selection.at(i)->type() == AVWidget) {
+ ClipItem *clip = static_cast <ClipItem *>(selection.at(i));
+ if (clip->clipType() == AV || clip->clipType() == Playlist) {
+ if (clip->parentItem()) {
+ emit displayMessage(i18n("Cannot split audio of grouped clips"), ErrorMessage);
+ } else {
+ new SplitAudioCommand(this, clip->track(), destTrack, clip->startPos(), masterCommand);
+ }
}
}
}
+ } else {
+ new SplitAudioCommand(this, info.track, destTrack, info.startPos, masterCommand);
}
if (masterCommand->childCount()) {
updateTrackDuration(-1, masterCommand);