+
+void EffectStackView2::slotCreateGroup(int ix)
+{
+ QDomElement oldeffect = m_currentEffectList.at(ix);
+ QDomElement neweffect = oldeffect.cloneNode().toElement();
+ QString groupName = QString::number(m_groupIndex);
+ m_groupIndex++;
+ EffectsList::setProperty(neweffect, "kdenlive_group", groupName);
+
+ ItemInfo info;
+ if (m_effectMetaInfo.trackMode) {
+ info.track = m_trackInfo.type;
+ info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
+ info.cropStart = GenTime(0);
+ info.startPos = GenTime(-1);
+ info.track = 0;
+ emit updateEffect(NULL, m_trackindex, oldeffect, neweffect, ix);
+ } else {
+ emit updateEffect(m_clipref, -1, oldeffect, neweffect, ix);
+ }
+
+ QVBoxLayout *l = static_cast<QVBoxLayout *>(m_ui.container->widget()->layout());
+ int groupPos = l->indexOf(m_effects.at(ix));
+
+ CollapsibleEffect *group = new CollapsibleEffect(QDomElement(), QDomElement(), ItemInfo(), m_groupIndex, &m_effectMetaInfo, false, true, m_ui.container->widget());
+ connect(group, SIGNAL(moveEffect(int, CollapsibleEffect*)), this , SLOT(slotMoveEffectToGroup(int, CollapsibleEffect*)));
+ CollapsibleEffect *w = static_cast<CollapsibleEffect*>(l->takeAt(groupPos)->widget());
+ l->insertWidget(groupPos, group);
+ group->addGroupEffect(w);
+}
+
+void EffectStackView2::slotMoveEffectToGroup(int ix, CollapsibleEffect* group)
+{
+ QVBoxLayout *l = static_cast<QVBoxLayout *>(m_ui.container->widget()->layout());
+ CollapsibleEffect *effectToMove = getEffectByIndex(ix);
+ if (effectToMove == NULL) return;
+ l->removeWidget(effectToMove);
+ group->addGroupEffect(effectToMove);
+}
+