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

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