X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmainwindow.cpp;h=be6ac10b1cd74c7ea2d0a70d1d910174a9374547;hb=66899599dbf3ee7ff3b7ecc850a56a55b90da106;hp=1455498e9728081856ed676c00b4d44476cccc24;hpb=329d1248a84869ad2f647147a549fea371cd492d;p=kdenlive diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1455498e..be6ac10b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -178,7 +178,7 @@ bool MainWindow::queryClose() } } -void MainWindow::slotAddEffect(QDomElement effect) +void MainWindow::slotAddEffect(QDomElement effect, GenTime pos, int track) { if (!m_activeDocument) return; /*QMap filter; @@ -188,8 +188,12 @@ void MainWindow::slotAddEffect(QDomElement effect) filter = m_audioEffects.effect(effectName); else filter = m_customEffects.effect(effectName);*/ + if (effect.isNull()) { + kDebug()<<"--- ERROR, TRYING TO APPEND NULL EFFECT"; + return; + } TrackView *currentTimeLine = (TrackView *) m_timelineArea->currentWidget(); - currentTimeLine->projectView()->slotAddEffect(effect); + currentTimeLine->projectView()->slotAddEffect(effect, pos, track); } void MainWindow::slotRaiseMonitor(bool clipMonitor) @@ -523,5 +527,10 @@ void MainWindow::customEvent ( QEvent * event ){ statusProgressBar->setVisible(false); } } + if (event->type()==10010){ + EffectEvent* p=(EffectEvent*) event; + slotAddEffect(p->xml(), p->pos(), p->track()); + } + } #include "mainwindow.moc"