Bus-wire entries can't propagate through bus junctions

This fixes strange connectivity issues observed if you manage
to get a bus junction touching a bus-wire entry.
This commit is contained in:
Jon Evans 2020-10-27 22:05:25 -04:00
parent 70c90266a8
commit 49fd95f58d
1 changed files with 8 additions and 0 deletions

View File

@ -27,6 +27,7 @@
#include <schematic.h> #include <schematic.h>
#include <sch_bus_entry.h> #include <sch_bus_entry.h>
#include <sch_edit_frame.h> #include <sch_edit_frame.h>
#include <sch_junction.h>
#include <sch_line.h> #include <sch_line.h>
#include <sch_text.h> #include <sch_text.h>
#include <settings/color_settings.h> #include <settings/color_settings.h>
@ -461,6 +462,13 @@ bool SCH_BUS_WIRE_ENTRY::ConnectionPropagatesTo( const EDA_ITEM* aItem ) const
return false; return false;
} }
// Same for bus junctions
if( ( aItem->Type() == SCH_JUNCTION_T ) &&
( static_cast<const SCH_JUNCTION*>( aItem )->GetLayer() == LAYER_BUS_JUNCTION ) )
{
return false;
}
// Don't generate connections between bus entries and bus labels that happen // Don't generate connections between bus entries and bus labels that happen
// to land at the same point on the bus wire as this bus entry // to land at the same point on the bus wire as this bus entry
if( ( aItem->Type() == SCH_LABEL_T ) && if( ( aItem->Type() == SCH_LABEL_T ) &&