Commit c3155b94 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Add mix clip action in timeline menu, fix undo resize on mixed clip

parent a976d33f
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="kdenlive" version="193" translationDomain="kdenlive">
<kpartgui name="kdenlive" version="194" translationDomain="kdenlive">
<MenuBar>
<Menu name="file" >
<Action name="file_save"/>
......@@ -112,6 +112,7 @@
<Action name="cut_timeline_clip" />
<Action name="delete_timeline_clip" />
<Action name="edit_item_duration" />
<Action name="mix_clip" />
<Action name="edit_item_speed" />
<Action name="clip_split" />
<Action name="clip_switch" />
......
......@@ -2676,6 +2676,7 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU
bool switchPlaylist = getTrackById_const(tid)->hasEndMix(mixData.second.secondClipId) == false && m_allClips[mixData.second.secondClipId]->getSubPlaylistIndex() == 1;
Fun sync_mix_undo = [this, tid, mixData]() {
getTrackById_const(tid)->createMix(mixData.second, getTrackById_const(tid)->isAudioTrack());
getTrackById_const(tid)->syncronizeMixes(true);
return true;
};
// Move second clip to first playlist again
......@@ -2697,6 +2698,7 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU
// Moved outside mix, delete
Fun sync_mix_undo = [this, tid, mixData]() {
getTrackById_const(tid)->createMix(mixData.first, getTrackById_const(tid)->isAudioTrack());
getTrackById_const(tid)->syncronizeMixes(true);
return true;
};
bool switchPlaylist = getTrackById_const(tid)->hasEndMix(itemId) == false && m_allClips[itemId]->getSubPlaylistIndex() == 1;
......@@ -2751,6 +2753,7 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU
// Resized outside mix
Fun sync_mix_undo = [this, tid, mixData]() {
getTrackById_const(tid)->createMix(mixData.second, getTrackById_const(tid)->isAudioTrack());
getTrackById_const(tid)->syncronizeMixes(true);
return true;
};
bool switchPlaylist = getTrackById_const(tid)->hasEndMix(mixData.second.secondClipId) == false && m_allClips[mixData.second.secondClipId]->getSubPlaylistIndex() == 1;
......@@ -2776,6 +2779,7 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU
// Moved outside mix, remove
Fun sync_mix_undo = [this, tid, mixData]() {
getTrackById_const(tid)->createMix(mixData.first, getTrackById_const(tid)->isAudioTrack());
getTrackById_const(tid)->syncronizeMixes(true);
return true;
};
bool switchPlaylist = getTrackById_const(tid)->hasEndMix(id) == false && m_allClips[id]->getSubPlaylistIndex() == 1;
......
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