From b2eef61a0b2816d6ede0ae01ba89db319562456d Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Mon, 30 Mar 2020 09:18:36 +0800 Subject: [PATCH] App: fix PropertyBool::setPathValue() --- src/App/PropertyStandard.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/App/PropertyStandard.cpp b/src/App/PropertyStandard.cpp index 8eefa6f249..12ed96fbbc 100644 --- a/src/App/PropertyStandard.cpp +++ b/src/App/PropertyStandard.cpp @@ -2119,8 +2119,12 @@ void PropertyBool::setPathValue(const ObjectIdentifier &path, const boost::any & setValue(boost::any_cast(value)); else if (value.type() == typeid(int)) setValue(boost::any_cast(value) != 0); + else if (value.type() == typeid(long)) + setValue(boost::any_cast(value) != 0); else if (value.type() == typeid(double)) setValue(boost::math::round(boost::any_cast(value))); + else if (value.type() == typeid(float)) + setValue(boost::math::round(boost::any_cast(value))); else if (value.type() == typeid(Quantity)) setValue(boost::any_cast(value).getValue() != 0); else