]> git.sesse.net Git - kdenlive/blobdiff - src/effectstackview.cpp
fix crash when starting under macOSX
[kdenlive] / src / effectstackview.cpp
index 5a6a61fbddc3ffbf36856d09ce946302e71297bc..939a58f93dcf73dd9cf25b246bcd23ab9713487e 100644 (file)
@@ -30,7 +30,7 @@
 #include "effectslist.h"
 #include "clipitem.h"
 #include "mainwindow.h"
-
+#include "kdenlivesettings.h"
 
 EffectStackView::EffectStackView(QWidget *parent)
         : QWidget(parent) {
@@ -77,8 +77,8 @@ void EffectStackView::setMenu(QMenu *menu) {
     ui.buttonNew->setMenu(menu);
 }
 
-void EffectStackView::updateProjectFormat(MltVideoProfile profile) {
-    effectedit->updateProjectFormat(profile);
+void EffectStackView::updateProjectFormat(MltVideoProfile profile, Timecode t) {
+    effectedit->updateProjectFormat(profile, t);
 }
 
 void EffectStackView::slotSaveEffect() {
@@ -179,7 +179,7 @@ void EffectStackView::setupListView(int ix) {
         }
     }
     if (clipref->effectsCount() == 0) {
-        emit transferParamDesc(QDomElement(), 0, 100);
+        emit transferParamDesc(QDomElement(), 0, 0);
         ui.buttonDel->setEnabled(false);
         ui.buttonSave->setEnabled(false);
         ui.buttonReset->setEnabled(false);
@@ -203,7 +203,7 @@ void EffectStackView::slotItemSelectionChanged() {
     bool isChecked = false;
     if (hasItem && ui.effectlist->currentItem()->checkState() == Qt::Checked) isChecked = true;
     if (hasItem && ui.effectlist->currentItem()->isSelected()) {
-        emit transferParamDesc(clipref->effectAt(activeRow), 0, 100);//minx max frame
+        emit transferParamDesc(clipref->effectAt(activeRow), clipref->cropStart().frames(KdenliveSettings::project_fps()), clipref->cropDuration().frames(KdenliveSettings::project_fps()));//minx max frame
     }
     if (clipref) clipref->setSelectedEffect(activeRow);
     ui.buttonDel->setEnabled(hasItem);
@@ -247,7 +247,7 @@ void EffectStackView::slotResetEffect() {
     }
     if (!dom.isNull()) {
         dom.setAttribute("kdenlive_ix", old.attribute("kdenlive_ix"));
-        emit transferParamDesc(dom, 0, 100);//minx max frame
+        emit transferParamDesc(dom, clipref->cropStart().frames(KdenliveSettings::project_fps()), clipref->cropDuration().frames(KdenliveSettings::project_fps()));//minx max frame
         emit updateClipEffect(clipref, old, dom, activeRow);
     }
 }