Mod/Sketcher: add missing brackets in conditions
Warning was: src/Mod/Sketcher/Gui/CommandConstraints.cpp|131 col 99| warning: '&&' within '||' [-Wlogical-op-parentheses]
This commit is contained in:
parent
95f0decaa5
commit
cd9488daf7
|
@ -142,7 +142,7 @@ void openEditDatumDialog(Sketcher::SketchObject* sketch, int ConstrNbr)
|
|||
double newDatum = newQuant.getValue();
|
||||
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))) {
|
||||
// Permit negative values to flip the sign of the constraint
|
||||
if (newDatum >= 0) // keep the old sign
|
||||
newDatum = ((datum >= 0) ? 1 : -1) * std::abs(newDatum);
|
||||
|
|
|
@ -147,7 +147,7 @@ void EditDatumDialog::exec(bool atCursor)
|
|||
double newDatum = newQuant.getValue();
|
||||
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))) {
|
||||
// Permit negative values to flip the sign of the constraint
|
||||
if (newDatum >= 0) // keep the old sign
|
||||
newDatum = ((datum >= 0) ? 1 : -1) * std::abs(newDatum);
|
||||
|
|
Loading…
Reference in New Issue
Block a user