diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 080fc802df..28630eef7b 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -1825,6 +1825,7 @@ std::shared_ptr CONNECTION_GRAPH::getDefaultConnection( SCH_ITEM if( pin->IsPowerConnection() ) { c = std::make_shared( aItem, aSheet ); + c->SetGraph( this ); c->ConfigureFromLabel( pin->GetName() ); } break; @@ -1837,6 +1838,7 @@ std::shared_ptr CONNECTION_GRAPH::getDefaultConnection( SCH_ITEM auto text = static_cast( aItem ); c = std::make_shared( aItem, aSheet ); + c->SetGraph( this ); c->ConfigureFromLabel( text->GetShownText() ); break; } diff --git a/eeschema/sch_connection.cpp b/eeschema/sch_connection.cpp index 313a6bfab4..3d5c4f3a7e 100644 --- a/eeschema/sch_connection.cpp +++ b/eeschema/sch_connection.cpp @@ -146,6 +146,7 @@ void SCH_CONNECTION::ConfigureFromLabel( const wxString& aLabel ) member->m_local_name = vector_member; member->m_vector_index = i++; member->SetName( vector_member ); + member->SetGraph( m_graph ); m_members.push_back( member ); } } @@ -212,6 +213,7 @@ void SCH_CONNECTION::Reset() void SCH_CONNECTION::Clone( SCH_CONNECTION& aOther ) { + m_graph = aOther.m_graph; m_type = aOther.Type(); m_driver = aOther.Driver(); m_sheet = aOther.Sheet();