diff --git a/companion/src/modeledit/node.cpp b/companion/src/modeledit/node.cpp index 33e92e0ca..09a6c6537 100644 --- a/companion/src/modeledit/node.cpp +++ b/companion/src/modeledit/node.cpp @@ -82,7 +82,7 @@ void Node::stepToCenter(qreal step) if(centerX) { qreal x = qr.right() - qr.width()/2; - if(abs(x-p.x())>xStep) + if(fabs(x-p.x())>xStep) p.rx() += p.x()>x ? -xStep : xStep; else p.rx() = x; @@ -91,7 +91,7 @@ void Node::stepToCenter(qreal step) if(centerY) { qreal y = qr.bottom() - qr.height()/2; - if(abs(y-p.y())>yStep) + if(fabs(y-p.y())>yStep) p.ry() += p.y()>y ? -yStep : yStep; else p.ry() = y; diff --git a/companion/src/simulation/simulatordialogtaranis.cpp b/companion/src/simulation/simulatordialogtaranis.cpp index 63d3c2ee8..6c1afcb81 100644 --- a/companion/src/simulation/simulatordialogtaranis.cpp +++ b/companion/src/simulation/simulatordialogtaranis.cpp @@ -120,7 +120,7 @@ void SimulatorDialogTaranis::getValues() { -pots[0]->value(), pots[1]->value(), - ((flags && SIMULATOR_FLAGS_S3) ? pots[2]->value() : 0), + ((flags & SIMULATOR_FLAGS_S3) ? pots[2]->value() : 0), -sliders[0]->value(), sliders[1]->value() },