Disable dragging constraints for Device (analog) terminals.

* Bug: In Anabatic::AutoHorizontal::_makeDogleg(), do not take into
    account dragging constraints from perpandiculars if the terminal
    is from a analog Device. We can never drag over it as it is
    forbidden.
      Same modification for AutoVertical.
This commit is contained in:
Jean-Paul Chaput 2018-03-02 16:58:21 +01:00
parent aa7b6fd620
commit db8675e501
2 changed files with 10 additions and 6 deletions

View File

@ -871,10 +871,12 @@ namespace Anabatic {
segment2->updateNativeConstraints();
if (autoTarget->canDrag() and not autoSource->canDrag()) {
Interval dragConstraints = autoTarget->getNativeUConstraints(Flags::Horizontal);
segment1->mergeUserConstraints( dragConstraints );
if (not autoTarget->getGCell()->isDevice()) {
Interval dragConstraints = autoTarget->getNativeUConstraints(Flags::Horizontal);
segment1->mergeUserConstraints( dragConstraints );
cdebug_log(149,0) << "Perpandical has drag constraints: " << dragConstraints << endl;
cdebug_log(149,0) << "Perpandical has drag constraints: " << dragConstraints << endl;
}
}
cdebug_tabw(149,-1);

View File

@ -781,10 +781,12 @@ namespace Anabatic {
segment2->updateNativeConstraints();
if (autoTarget->canDrag() and not autoSource->canDrag()) {
Interval dragConstraints = autoTarget->getNativeUConstraints(Flags::Vertical);
segment1->mergeUserConstraints( dragConstraints );
if (not autoTarget->getGCell()->isDevice()) {
Interval dragConstraints = autoTarget->getNativeUConstraints(Flags::Vertical);
segment1->mergeUserConstraints( dragConstraints );
cdebug_log(149,0) << "Perpandical has drag constraints: " << dragConstraints << endl;
cdebug_log(149,0) << "Perpandical has drag constraints: " << dragConstraints << endl;
}
}
return (upLayer) ? Flags::AboveLayer : Flags::BelowLayer;