- const QString effects = QString::fromUtf8(event->mimeData()->data("kdenlive/effectslist"));
- event->acceptProposedAction();
- QDomDocument doc;
- doc.setContent(effects, true);
- QDomElement e = doc.documentElement();
- if (e.tagName() == "effectgroup") {
- // dropped an effect group
- QDomNodeList effectlist = e.elementsByTagName("effect");
- int freeGroupIndex = nextFreeEffectGroupIndex();
- EffectInfo effectInfo;
- for (int i = 0; i < effectlist.count(); ++i) {
- QDomElement effect = effectlist.at(i).toElement();
- effectInfo.fromString(effect.attribute("kdenlive_info"));
- effectInfo.groupIndex = freeGroupIndex;
- effect.setAttribute("kdenlive_info", effectInfo.toString());
- effect.removeAttribute("kdenlive_ix");
- }
- } else {
- // single effect dropped
- e.removeAttribute("kdenlive_ix");
- }
- CustomTrackView *view = (CustomTrackView *) scene()->views()[0];
+ const QString effects = QString::fromUtf8(event->mimeData()->data("kdenlive/effectslist"));
+ event->acceptProposedAction();
+ QDomDocument doc;
+ doc.setContent(effects, true);
+ QDomElement e = doc.documentElement();
+ if (e.tagName() == "effectgroup") {
+ // dropped an effect group
+ QDomNodeList effectlist = e.elementsByTagName("effect");
+ int freeGroupIndex = nextFreeEffectGroupIndex();
+ EffectInfo effectInfo;
+ for (int i = 0; i < effectlist.count(); ++i) {
+ QDomElement effect = effectlist.at(i).toElement();
+ effectInfo.fromString(effect.attribute("kdenlive_info"));
+ effectInfo.groupIndex = freeGroupIndex;
+ effect.setAttribute("kdenlive_info", effectInfo.toString());
+ effect.removeAttribute("kdenlive_ix");
+ }
+ } else {
+ // single effect dropped
+ e.removeAttribute("kdenlive_ix");
+ }
+ CustomTrackView *view = (CustomTrackView *) scene()->views().first();