Apply the same accuracy band to connectivity as we use for hittesting.
Fixes https://gitlab.com/kicad/code/kicad/issues/10745
This commit is contained in:
parent
93670d2b24
commit
9cf3c529d3
|
@ -338,11 +338,13 @@ int EDIT_TOOL::Drag( const TOOL_EVENT& aEvent )
|
||||||
std::shared_ptr<CONNECTIVITY_DATA> c = board->GetConnectivity();
|
std::shared_ptr<CONNECTIVITY_DATA> c = board->GetConnectivity();
|
||||||
std::vector<BOARD_CONNECTED_ITEM*> cItems;
|
std::vector<BOARD_CONNECTED_ITEM*> cItems;
|
||||||
|
|
||||||
|
int accuracy = KiROUND( 5 * aCollector.GetGuide()->OnePixelInIU() );
|
||||||
|
|
||||||
if( vias.size() == 1 )
|
if( vias.size() == 1 )
|
||||||
{
|
{
|
||||||
cItems = c->GetConnectedItemsAtAnchor( vias[0], aPt,
|
cItems = c->GetConnectedItemsAtAnchor( vias[0], aPt,
|
||||||
{ PCB_TRACE_T, PCB_ARC_T },
|
{ PCB_TRACE_T, PCB_ARC_T },
|
||||||
vias[0]->GetWidth() / 2 );
|
vias[0]->GetWidth() / 2 + accuracy );
|
||||||
|
|
||||||
if( alg::contains( cItems, tracks[0] )
|
if( alg::contains( cItems, tracks[0] )
|
||||||
&& alg::contains( cItems, tracks[1] ) )
|
&& alg::contains( cItems, tracks[1] ) )
|
||||||
|
@ -355,7 +357,7 @@ int EDIT_TOOL::Drag( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
cItems = c->GetConnectedItemsAtAnchor( tracks[0], aPt,
|
cItems = c->GetConnectedItemsAtAnchor( tracks[0], aPt,
|
||||||
{ PCB_TRACE_T, PCB_ARC_T },
|
{ PCB_TRACE_T, PCB_ARC_T },
|
||||||
tracks[0]->GetWidth() / 2 );
|
tracks[0]->GetWidth() / 2 + accuracy );
|
||||||
|
|
||||||
if( alg::contains( cItems, tracks[1] ) )
|
if( alg::contains( cItems, tracks[1] ) )
|
||||||
aCollector.Remove( tracks[1] );
|
aCollector.Remove( tracks[1] );
|
||||||
|
|
Loading…
Reference in New Issue