Logo Search packages:      
Sourcecode: kdenlive version File versions

void Command::KAddEffectCommand::deleteEffect (  )  [private]

Deletes the effect from the clip.

Definition at line 140 of file kaddeffectcommand.cpp.

References KdenliveDoc::activateSceneListGeneration(), KdenliveDoc::createEffect(), DocTrackBase::deleteEffectFromClip(), Effect::effectDescription(), Effect::isEnabled(), m_effect, m_effectIndex, m_position, m_trackIndex, DocClipProject::playlistTrackNum(), KdenliveDoc::projectClip(), KdenliveDoc::renderer(), and DocClipProject::track().

Referenced by unexecute().

                                         {
      DocTrackBase *track =
          m_document->projectClip().track(m_trackIndex);
      if (track) {
          Effect *effect = m_document->createEffect(m_effect.documentElement());
          QString tag = effect->effectDescription().tag();
          track->deleteEffectFromClip(m_position, m_effectIndex);
          int index = m_effectIndex;
          if (effect->effectDescription().parameter(0)->type() == "complex" || effect->effectDescription().parameter(0)->type() == "double") index = -1;
          if (effect->isEnabled()) {
            if (tag != QString("chroma") && tag != QString("affine")) 
                m_document->renderer()->mltRemoveEffect(m_document->projectClip().playlistTrackNum(m_trackIndex), m_position, effect->effectDescription().stringId(),  tag, index);
            else m_document->activateSceneListGeneration(true);
          }
          delete effect;
      } else {
          kdError() <<
            "KAddEffectCommand::deleteEffect() - cannot find track index "
            << m_trackIndex << ", expect inconsistancies..." << endl;
      }
    }


Generated by  Doxygen 1.6.0   Back to index