int ix;
QDomElement insertedEffect;
if (!effect.hasAttribute("kdenlive_ix")) {
+ // effect dropped from effect list
ix = effectsCounter();
} else ix = effect.attribute("kdenlive_ix").toInt();
if (!m_effectList.isEmpty() && ix <= m_effectList.count()) {
QDomNodeList effects = m_baseElement.childNodes();
int ix = effect.attribute("kdenlive_ix").toInt();
QDomElement result;
- if (effect.hasAttribute("kdenlive_ix") && ix > effects.count()) {
+ if (ix <= 0 || ix > effects.count()) {
ix = effects.count();
result = m_baseElement.appendChild(importNode(effect, true)).toElement();
}