From 6faf83309e9ba766f7411e32b15483b0c1509e57 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 26 Sep 2019 01:16:01 +0200 Subject: [PATCH] Force pitching on dragged AutoContacts. * Change: In Anabatic::AutoContactTerminal::updateGeometry(), when a draggable AutoContact is moved, pitch it on the routing grid instead of putting it in lowest/highest position. --- anabatic/src/AutoContactTerminal.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/anabatic/src/AutoContactTerminal.cpp b/anabatic/src/AutoContactTerminal.cpp index 6705801d..02d8b228 100644 --- a/anabatic/src/AutoContactTerminal.cpp +++ b/anabatic/src/AutoContactTerminal.cpp @@ -497,8 +497,11 @@ namespace Anabatic { DbU::Unit y = perpandicular->getAxis(); y = std::min( y, getCBYMax() ); y = std::max( y, getCBYMin() ); - setY( y ); - cdebug_log(145,0) << "Draging to Y @" << DbU::getValueString(y) << endl; + Point onGrid = Session::getNearestGridPoint( Point(getX(),y), getConstraintBox() ); + setY( onGrid.getY() ); + cdebug_log(145,0) << "Draging to Y @" << DbU::getValueString(y) + << " pitched:" << DbU::getValueString(onGrid.getY()) + << " " << getConstraintBox() << endl; } }