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.
This commit is contained in:
Jean-Paul Chaput 2019-09-26 01:16:01 +02:00
parent 2bd18313d1
commit 6faf83309e
1 changed files with 5 additions and 2 deletions

View File

@ -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;
}
}