Fix bug in tool property browser. Too strict check makes impossible to fix
formula value. --HG-- branch : develop
This commit is contained in:
parent
cacca07c13
commit
5f3ee65501
|
@ -198,10 +198,12 @@ void VFormulaProperty::SetFormula(const VFormula &formula)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VFormulaProperty::ValueChildChanged(const QVariant &value, int typeForParent)
|
void VFormulaProperty::ValueChildChanged(const QVariant &value, int typeForParent)
|
||||||
{
|
{
|
||||||
Q_UNUSED(typeForParent)
|
Q_UNUSED(typeForParent)
|
||||||
VFormula newFormula = GetFormula();
|
VFormula newFormula = GetFormula();
|
||||||
newFormula.SetFormula(value.toString(), FormulaType::FromUser);
|
newFormula.SetFormula(value.toString(), FormulaType::FromUser);
|
||||||
|
newFormula.Eval();
|
||||||
SetFormula(newFormula);
|
SetFormula(newFormula);
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,7 +217,7 @@ void VToolLinePoint::SetLineColor(const QString &value)
|
||||||
VFormula VToolLinePoint::GetFormulaLength() const
|
VFormula VToolLinePoint::GetFormulaLength() const
|
||||||
{
|
{
|
||||||
VFormula fLength(formulaLength, this->getData());
|
VFormula fLength(formulaLength, this->getData());
|
||||||
fLength.setCheckZero(true);
|
fLength.setCheckZero(false);
|
||||||
fLength.setToolId(m_id);
|
fLength.setToolId(m_id);
|
||||||
fLength.setPostfix(UnitsToStr(qApp->patternUnit()));
|
fLength.setPostfix(UnitsToStr(qApp->patternUnit()));
|
||||||
fLength.Eval();
|
fLength.Eval();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user