mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GT-3153 - Function Graph - fixed bug exposed by extra wide vertices when
routing upwards
This commit is contained in:
parent
68108b088e
commit
69ec52354c
1 changed files with 14 additions and 6 deletions
|
@ -569,17 +569,26 @@ public class DecompilerNestedLayout extends AbstractFGLayout {
|
|||
startRow = end.rowIndex;
|
||||
}
|
||||
|
||||
List<Vertex2d> toCheck = new LinkedList<>();
|
||||
for (int row = startRow + 1; row < endRow; row++) {
|
||||
|
||||
// assume any other vertex in our column can clip (it will not clip when
|
||||
// the 'spacing' above pushes the edge away from this column, like for
|
||||
// large row delta values)
|
||||
Vertex2d otherVertex = vertex2dFactory.get(row, column);
|
||||
if (otherVertex == null) {
|
||||
continue; // no vertex in this cell
|
||||
if (otherVertex != null) {
|
||||
toCheck.add(otherVertex);
|
||||
}
|
||||
}
|
||||
|
||||
// always process the vertices from the start vertex so that the articulation adjustments
|
||||
// are correct
|
||||
if (!goingDown) {
|
||||
Collections.reverse(toCheck);
|
||||
}
|
||||
|
||||
int delta = endRow - startRow;
|
||||
for (Vertex2d otherVertex : toCheck) {
|
||||
|
||||
int delta = endRow - startRow;
|
||||
int padding = VERTEX_TO_EDGE_AVOIDANCE_PADDING;
|
||||
int distanceSpacing = padding + delta; // adding the delta makes overlap less likely
|
||||
|
||||
|
@ -607,8 +616,7 @@ public class DecompilerNestedLayout extends AbstractFGLayout {
|
|||
// no need to check the 'y' value, as the end vertex is above/below this one
|
||||
if (vertexClipper.isClippingX(otherVertex, edgeX)) {
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
Must route around this vertex - new points:
|
||||
-p1 - just above the intersection point
|
||||
-p2 - just past the left edge
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue