BasicBlocks with many incoming edges were pushed downwards faster than
those with less incoming edges resulting in unnatural graph layouting.
Now we move each widget exactly once (move the widget on collissions,
not its successors) keeping the basic ordering by addresses.
The result is not perfect -- there's quite some room for further
improvements though!
Ref 5
if (NULL != next[0]
&& (next[0]->getEntry() - widget->getEntry()).y() > 0
&& (next[0]->getEntry() - out).y() < 50) {
- next[0]->moveBy(0, 1);
+ widget->moveBy(0, -1);
changed = true;
- }
- if (NULL != next[1]
+ } else if (NULL != next[1]
&& (next[1]->getEntry() - widget->getEntry()).y() > 0
&& (next[1]->getEntry() - out).y() < 50) {
- next[1]->moveBy(0, 1);
+ widget->moveBy(0, -1);
changed = true;
}
}