aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2017-08-04 07:28:20 +0200
committerJean-Baptiste Mardelle <[email protected]>2017-08-04 07:28:20 +0200
commitcbb224784f1effd7d2b37afd7513de4f1dd634aa (patch)
treede2718ada3935b012775d95e57beed5564c697c1
parent4cac44220ec1d2ea04c6dae91341b58b614df69d (diff)
Fix some checkbox displaying inconsistent info
-rw-r--r--src/effectstack/parametercontainer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/effectstack/parametercontainer.cpp b/src/effectstack/parametercontainer.cpp
index f6f40ba..518bb7a 100644
--- a/src/effectstack/parametercontainer.cpp
+++ b/src/effectstack/parametercontainer.cpp
@@ -145,7 +145,6 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
QString conditionParam = EffectsList::parameter(effect, condition);
m_conditionParameter = !conditionParam.isEmpty();
}
-
if (effect.attribute(QStringLiteral("id")) == QLatin1String("movit.lift_gamma_gain") || effect.attribute(QStringLiteral("id")) == QLatin1String("lift_gamma_gain")) {
// We use a special custom widget here
LumaLiftGain *gainWidget = new LumaLiftGain(namenode, parent);
@@ -282,7 +281,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
}
m_vbox->addWidget(lswid);
} else if (type == QLatin1String("bool")) {
- bool checked = (value == QLatin1String("1"));
+ bool checked = (value.toInt() == 1);
BoolParamWidget *bwid = new BoolParamWidget(paramName, comment, checked, parent);
if (m_conditionParameter && pa.hasAttribute(QStringLiteral("conditional"))) {
bwid->setEnabled(false);
@@ -293,7 +292,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
connect(this, SIGNAL(showComments(bool)), bwid, SLOT(slotShowComment(bool)));
m_vbox->addWidget(bwid);
} else if (type == QLatin1String("switch")) {
- bool checked = (value == pa.attribute("min"));
+ bool checked = (value == pa.attribute("max"));
BoolParamWidget *bwid = new BoolParamWidget(paramName, comment, checked, parent);
if (m_conditionParameter && pa.hasAttribute(QStringLiteral("conditional"))) {
bwid->setEnabled(false);