]> git.sesse.net Git - kdenlive/blobdiff - src/projectlist.cpp
several updates for slideshow clips
[kdenlive] / src / projectlist.cpp
index 2da1928d5cd13e73f337b1b44e46b101cdb6e598..e58af2d10884bfa1202d9f580326f6ae1eb34471 100644 (file)
@@ -140,9 +140,10 @@ void ProjectList::slotClipSelected() {
 void ProjectList::slotUpdateClipProperties(int id, QMap <QString, QString> properties) {
     ProjectItem *item = getItemById(id);
     if (item) {
-      slotUpdateClipProperties(item, properties);
-      if (properties.contains("colour")) slotRefreshClipThumbnail(item);
-  }
+        slotUpdateClipProperties(item, properties);
+        if (properties.contains("colour") || properties.contains("resource")) slotRefreshClipThumbnail(item);
+        if (properties.contains("out")) item->changeDuration(properties.value("out").toInt());
+    }
 }
 
 void ProjectList::slotUpdateClipProperties(ProjectItem *clip, QMap <QString, QString> properties) {
@@ -421,7 +422,7 @@ void ProjectList::slotAddColorClip() {
 
 void ProjectList::slotAddSlideshowClip() {
     if (!m_commandStack) kDebug() << "!!!!!!!!!!!!!!!!  NO CMD STK";
-    SlideshowClip *dia = new SlideshowClip();
+    SlideshowClip *dia = new SlideshowClip(this);
 
     if (dia->exec() == QDialog::Accepted) {
 
@@ -510,7 +511,7 @@ void ProjectList::slotRefreshClipThumbnail(ProjectItem *item) {
         int height = 40;
         int width = (int)(height  * (double) m_render->renderWidth() / m_render->renderHeight());
         QPixmap pix = KThumb::getImage(item->toXml(), item->referencedClip()->getProjectThumbFrame(), width, height);
-       //QPixmap pix = KThumb::getFrame(item->toXml()), 0, width, height);
+        //QPixmap pix = KThumb::getFrame(item->toXml()), 0, width, height);
         item->setIcon(0, pix);
     }
 }