From 1cf3667f628148ed8461008a80ab505a24b0d0dd Mon Sep 17 00:00:00 2001 From: Eivind Kvedalen Date: Tue, 3 Oct 2017 01:12:35 +0200 Subject: [PATCH] Fix for issue #3200: Convert angle to degrees when used in an expression. --- src/App/PropertyGeo.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/App/PropertyGeo.cpp b/src/App/PropertyGeo.cpp index 19c21fc4d2..375927cfac 100644 --- a/src/App/PropertyGeo.cpp +++ b/src/App/PropertyGeo.cpp @@ -702,7 +702,11 @@ const boost::any PropertyPlacement::getPathValue(const ObjectIdentifier &path) c { std::string p = path.getSubPathStr(); - if (p == ".Base.x" || p == ".Base.y" || p == ".Base.z") { + if (p == ".Rotation.Angle") { + // Convert angle to degrees + return Base::Quantity(Base::toDegrees(boost::any_cast(Property::getPathValue(path))), Unit::Angle); + } + else if (p == ".Base.x" || p == ".Base.y" || p == ".Base.z") { // Convert double to quantity return Base::Quantity(boost::any_cast(Property::getPathValue(path)), Unit::Length); }