From db8675e501c1569186567f9e15b37b56db9ea7f8 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 2 Mar 2018 16:58:21 +0100 Subject: [PATCH] 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. --- anabatic/src/AutoHorizontal.cpp | 8 +++++--- anabatic/src/AutoVertical.cpp | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/anabatic/src/AutoHorizontal.cpp b/anabatic/src/AutoHorizontal.cpp index 36a55ba0..faadf0b0 100644 --- a/anabatic/src/AutoHorizontal.cpp +++ b/anabatic/src/AutoHorizontal.cpp @@ -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); diff --git a/anabatic/src/AutoVertical.cpp b/anabatic/src/AutoVertical.cpp index ea7d5a6d..bbf8dec6 100644 --- a/anabatic/src/AutoVertical.cpp +++ b/anabatic/src/AutoVertical.cpp @@ -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;