Fix bug in tool property browser. Too strict check makes impossible to fix

formula value.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-02-22 14:59:39 +02:00
parent cacca07c13
commit 5f3ee65501
2 changed files with 3 additions and 1 deletions

View file

@ -198,10 +198,12 @@ void VFormulaProperty::SetFormula(const VFormula &formula)
}
}
//---------------------------------------------------------------------------------------------------------------------
void VFormulaProperty::ValueChildChanged(const QVariant &value, int typeForParent)
{
Q_UNUSED(typeForParent)
VFormula newFormula = GetFormula();
newFormula.SetFormula(value.toString(), FormulaType::FromUser);
newFormula.Eval();
SetFormula(newFormula);
}

View file

@ -217,7 +217,7 @@ void VToolLinePoint::SetLineColor(const QString &value)
VFormula VToolLinePoint::GetFormulaLength() const
{
VFormula fLength(formulaLength, this->getData());
fLength.setCheckZero(true);
fLength.setCheckZero(false);
fLength.setToolId(m_id);
fLength.setPostfix(UnitsToStr(qApp->patternUnit()));
fLength.Eval();