aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2016-06-29 10:21:16 +0200
committerJean-Baptiste Mardelle <[email protected]>2016-06-29 10:21:16 +0200
commitc10f66e0096a9770e85a66ba63eaab082c56c152 (patch)
tree7980d58153c3524257d79a3ba53f63ab5530b221
parent167a7aa96891c258a7d8edf808c9ffb9a505baec (diff)
Fix corruption on insert with grouped clips
-rw-r--r--src/timeline/customtrackview.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/timeline/customtrackview.cpp b/src/timeline/customtrackview.cpp
index c4b6777..1de3872 100644
--- a/src/timeline/customtrackview.cpp
+++ b/src/timeline/customtrackview.cpp
@@ -4047,12 +4047,16 @@ void CustomTrackView::insertSpace(QList<ItemInfo> clipsToMove, QList<ItemInfo> t
// update items coordinates
QList<QGraphicsItem *> itemList = m_selectionGroup->childItems();
+ QList<AbstractGroupItem *> groupList;
for (int i = 0; i < itemList.count(); ++i) {
if (itemList.at(i)->type() == AVWidget || itemList.at(i)->type() == TransitionWidget) {
int realTrack = getTrackFromPos(itemList.at(i)->scenePos().y());
static_cast < AbstractClipItem *>(itemList.at(i))->updateItem(realTrack);
} else if (itemList.at(i)->type() == GroupWidget) {
+ AbstractGroupItem *group = static_cast < AbstractGroupItem *>(itemList.at(i));
+ groupList << group;
+ m_document->clipManager()->removeGroup(group);
QList<QGraphicsItem *> children = itemList.at(i)->childItems();
for (int j = 0; j < children.count(); ++j) {
AbstractClipItem * clp = static_cast < AbstractClipItem *>(children.at(j));
@@ -4063,6 +4067,10 @@ void CustomTrackView::insertSpace(QList<ItemInfo> clipsToMove, QList<ItemInfo> t
}
m_selectionMutex.unlock();
resetSelectionGroup(false);
+ // Rebuild groups after translate
+ foreach (AbstractGroupItem *grp, groupList) {
+ rebuildGroup(grp);
+ }
m_document->renderer()->mltInsertSpace(trackClipStartList, trackTransitionStartList, track, duration, offset);
}