+ if (affectGroup && clip->parentItem() && clip->parentItem() == m_selectionGroup) {
+ //clip is in a group, also remove the effect in other clips of the group
+ QList<QGraphicsItem *> items = m_selectionGroup->childItems();
+ QUndoCommand *delCommand = new QUndoCommand();
+ QString effectName;
+ QDomNode namenode = effect.elementsByTagName("name").item(0);
+ if (!namenode.isNull()) effectName = i18n(namenode.toElement().text().toUtf8().data());
+ else effectName = i18n("effect");
+ delCommand->setText(i18n("Delete %1", effectName));
+
+ //expand groups
+ for (int i = 0; i < items.count(); i++) {
+ if (items.at(i)->type() == GROUPWIDGET) {
+ QList<QGraphicsItem *> subitems = items.at(i)->childItems();
+ for (int j = 0; j < subitems.count(); j++) {
+ if (!items.contains(subitems.at(j))) items.append(subitems.at(j));
+ }
+ }
+ }
+
+ for (int i = 0; i < items.count(); i++) {
+ if (items.at(i)->type() == AVWIDGET) {
+ ClipItem *item = static_cast <ClipItem *>(items.at(i));
+ int ix = item->hasEffect(effect.attribute("tag"), effect.attribute("id"));
+ if (ix != -1) {
+ QDomElement eff = item->effectAt(ix);
+ new AddEffectCommand(this, m_document->tracksCount() - item->track(), item->startPos(), eff, false, delCommand);
+ }
+ }
+ }
+ if (delCommand->childCount() > 0) m_commandStack->push(delCommand);
+ else delete delCommand;
+ return;
+ }