Sketcher: Changed return type of Constraint::getPresentationValue() to Quantity, to be able to include unit.
This commit is contained in:
@@ -133,20 +133,20 @@ double Constraint::getValue() const
|
||||
return Value;
|
||||
}
|
||||
|
||||
double Constraint::getPresentationValue() const
|
||||
Quantity Constraint::getPresentationValue() const
|
||||
{
|
||||
switch (Type) {
|
||||
case Distance:
|
||||
case Radius:
|
||||
return Value;
|
||||
return Quantity(Value, Unit::Length);
|
||||
case DistanceX:
|
||||
case DistanceY:
|
||||
if (FirstPos == Sketcher::none || Second != Sketcher::Constraint::GeoUndef)
|
||||
return Value;
|
||||
return Quantity(Value, Unit::Length);
|
||||
else
|
||||
return Value;
|
||||
return Quantity(Value, Unit::Length);
|
||||
case Angle:
|
||||
return Base::toDegrees<double>(Value);
|
||||
return Quantity(toDegrees<double>(Value), Unit::Angle);
|
||||
case SnellsLaw:
|
||||
return Value;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user