From 3adff647a7e0f48abb89a607665cdde71e5f05bd Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 28 Dec 2020 19:44:39 -0500 Subject: [PATCH] PNS: Preserve nearest vertex when dragging in shove mode --- pcbnew/router/pns_optimizer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp index 67e1ce3dea..d507ba25fb 100644 --- a/pcbnew/router/pns_optimizer.cpp +++ b/pcbnew/router/pns_optimizer.cpp @@ -1042,6 +1042,9 @@ bool OPTIMIZER::Optimize( LINE* aLine, int aEffortLevel, NODE* aWorld, const VEC opt.SetEffortLevel( aEffortLevel ); opt.SetCollisionMask( -1 ); + if( aEffortLevel & OPTIMIZER::PRESERVE_VERTEX ) + opt.SetPreserveVertex( aV ); + return opt.Optimize( aLine ); }