+ fixes #0001656: Vertical/horizontal distance constraint confuses for a line or two points

This commit is contained in:
wmayer
2014-12-30 15:20:29 +01:00
parent fba0ef0671
commit ff09f0524d
2 changed files with 5 additions and 3 deletions

View File

@@ -116,9 +116,10 @@ void EditDatumDialog::exec(bool atCursor)
//ui_ins_datum.lineEdit->setParamGrpPath("User parameter:History/Sketcher/SetDatum");
// e.g. an angle or a distance X or Y applied on a line or two vertexes
if (Constr->Type == Sketcher::Angle ||
((Constr->Type == Sketcher::DistanceX || Constr->Type == Sketcher::DistanceY) &&
Constr->FirstPos == Sketcher::none || Constr->Second != Sketcher::Constraint::GeoUndef))
(Constr->FirstPos == Sketcher::none || Constr->Second != Sketcher::Constraint::GeoUndef)))
// hide negative sign
init_val.setValue(std::abs(datum));