Commit a3f047df authored by Sven Langkamp's avatar Sven Langkamp
Browse files

fix loading of curve when old and new data is in the file

BUG:276677
parent a9784a79
......@@ -98,11 +98,13 @@ void KisCurveOption::readNamedOptionSetting(const QString& prefix, const KisProp
if(sensor)
setSensor(sensor);
bool customCurve = setting->getBool("Custom" + prefix, false);
if(customCurve)
m_sensor->setCurve(setting->getCubicCurve("Curve" + prefix));
// only load the old curve format if the curve wasn't saved by the sensor
if(!setting->getString(prefix + "Sensor").contains("curve")) {
bool customCurve = setting->getBool("Custom" + prefix, false);
if(customCurve)
m_sensor->setCurve(setting->getCubicCurve("Curve" + prefix));
}
m_value = setting->getDouble(m_name + "Value" , m_maxValue);
m_useCurve = setting->getBool (m_name + "UseCurve", true);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment