Commit 5f607674 authored by Jean-Paul Chaput's avatar Jean-Paul Chaput
Browse files

In AutoSegment::expandToMinLength(), ensure that we stay on foundry grid

parent 352ca944
......@@ -1697,8 +1697,13 @@ namespace Anabatic {
return false;
}
DbU::Unit oneGrid = DbU::fromGrid( 1 );
DbU::Unit targetExpand = (techMinLength - segMinLength) / 2 + targetCap;
DbU::Unit sourceExpand = - (techMinLength - segMinLength) / 2 - sourceCap;
if (targetExpand % oneGrid)
targetExpand += oneGrid - targetExpand % oneGrid;
if (sourceExpand % oneGrid)
sourceExpand -= oneGrid + sourceExpand % oneGrid;
if (not span.isEmpty()) {
DbU::Unit shiftLeft = span.getVMax() - (getTargetU() + targetExpand);
if (shiftLeft < 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment