X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Feffectstackedit.cpp;h=ad4df484dca03fa0cf5e70f9cb5164e1941ce38e;hb=4359bf84c589b4cdd98c4591b1571fd8366cb112;hp=0b1621e64b5250af1bf020d15df50d93395403e6;hpb=e35da67a872b0f69384d3934a7b2caa5b0c6f1d6;p=kdenlive diff --git a/src/effectstackedit.cpp b/src/effectstackedit.cpp index 0b1621e6..ad4df484 100644 --- a/src/effectstackedit.cpp +++ b/src/effectstackedit.cpp @@ -259,19 +259,19 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, ItemInfo info, bool /** See effects/README for info on the different types */ if (type == "double" || type == "constant") { - int min; - int max; + double min; + double max; if (pa.attribute("min").startsWith('%')) - min = (int) ProfilesDialog::getStringEval(m_profile, pa.attribute("min")); + min = ProfilesDialog::getStringEval(m_profile, pa.attribute("min")); else - min = pa.attribute("min").toInt(); + min = pa.attribute("min").toDouble(); if (pa.attribute("max").startsWith('%')) - max = (int) ProfilesDialog::getStringEval(m_profile, pa.attribute("max")); + max = ProfilesDialog::getStringEval(m_profile, pa.attribute("max")); else - max = pa.attribute("max").toInt(); + max = pa.attribute("max").toDouble(); - DoubleParameterWidget *doubleparam = new DoubleParameterWidget(paramName, (int)(value.toDouble() + 0.5), min, max, - pa.attribute("default").toInt(), comment, -1, pa.attribute("suffix"), this); + DoubleParameterWidget *doubleparam = new DoubleParameterWidget(paramName, value.toDouble(), min, max, + pa.attribute("default").toDouble(), comment, -1, pa.attribute("suffix"), pa.attribute("decimals").toInt(), this); m_vbox->addWidget(doubleparam); m_valueItems[paramName] = doubleparam; connect(doubleparam, SIGNAL(valueChanged(int)), this, SLOT(collectAllParameters()));