summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <jb@kdenlive.org>2016-12-04 16:11:37 (GMT)
committerJean-Baptiste Mardelle <jb@kdenlive.org>2016-12-04 16:11:37 (GMT)
commitd212d92068e8e40ff26014043d1b7f73104a92fd (patch)
tree55f5bc2c10c05d807ba4e98b3257a9bad2463fda
parent336e3d2baf10d845cc7d14bccb3164ac1f8b6957 (diff)
Fix bug in ungroup (locked clip )
-rw-r--r--src/timeline/customtrackview.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/timeline/customtrackview.cpp b/src/timeline/customtrackview.cpp
index fbbc4d4..67b1052 100644
--- a/src/timeline/customtrackview.cpp
+++ b/src/timeline/customtrackview.cpp
@@ -4404,21 +4404,31 @@ void CustomTrackView::groupClips(bool group, QList<QGraphicsItem *> itemList, bo
// Expand groups
int max = itemList.count();
for (int i = 0; i < max; ++i) {
- if (itemList.at(i)->type() == GroupWidget && itemList.at(i) != m_selectionGroup) {
- if (!existingGroups.contains(itemList.at(i))) {
- existingGroups << itemList.at(i);
+ QGraphicsItem *item = itemList.at(i);
+ if (item->type() == GroupWidget && item != m_selectionGroup) {
+ if (!existingGroups.contains(item)) {
+ existingGroups << item;
}
- itemList += itemList.at(i)->childItems();
+ itemList += item->childItems();
+ } else if (item->parentItem() && item->parentItem()->type() == GroupWidget) {
+ AbstractGroupItem *grp = static_cast <AbstractGroupItem *>(item->parentItem());
+ itemList += grp->childItems();
}
}
-
+ QList <AbstractClipItem *> processedClips;
for (int i = 0; i < itemList.count(); ++i) {
if (itemList.at(i)->type() == AVWidget) {
AbstractClipItem *clip = static_cast <AbstractClipItem *>(itemList.at(i));
- if (forceLock || !clip->isItemLocked()) clipInfos.append(clip->info());
+ if (!processedClips.contains(clip) && (forceLock || !clip->isItemLocked())) {
+ clipInfos.append(clip->info());
+ processedClips << clip;
+ }
} else if (itemList.at(i)->type() == TransitionWidget) {
AbstractClipItem *clip = static_cast <AbstractClipItem *>(itemList.at(i));
- if (forceLock || !clip->isItemLocked()) transitionInfos.append(clip->info());
+ if (!processedClips.contains(clip) && (forceLock || !clip->isItemLocked())) {
+ transitionInfos.append(clip->info());
+ processedClips << clip;
+ }
}
}
if (clipInfos.count() > 0) {