45 std::vector<wxString> tests = {
61 for(
const wxString&
test : tests )
65 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
69 for(
size_t ii = 0; ii <
path.size(); ++ii )
73 std::vector<SCH_ITEM*> items;
77 if( !item->IsConnectable() )
86 items.push_back(
pin );
91 items.push_back( item );
97 const std::vector<SCH_ITEM*>& conn_items = item->ConnectedItems(
path );
99 wxString netname = conn ? conn->
GetNetName().ToStdString() : wxString(
"NoNet" );
103 <<
": Item " << item->GetFriendlyName().ToStdString()
104 <<
" in net " << netname.ToStdString() <<
" subgraph " << subgraph
105 <<
" has " << conn_items.size() <<
" connections" );
110 if( !item->IsConnectable() )
113 std::vector<SCH_ITEM*> prev_items = item->ConnectedItems(
path );
114 std::sort( prev_items.begin(), prev_items.end() );
117 std::set<std::pair<SCH_SHEET_PATH, SCH_ITEM*>> all_items =
118 m_schematic->ConnectionGraph()->ExtractAffectedItems( { item } );
119 all_items.insert( {
path, item } );
121 <<
": Item " << item->GetFriendlyName().ToStdString()
122 <<
" in net " << netname.ToStdString()
123 <<
" has " << all_items.size() <<
" affected items" );
127 new_graph.
SetLastCodes( m_schematic->ConnectionGraph() );
129 for(
auto&[ apath, aitem ] : all_items )
131 wxCHECK2( aitem,
continue );
132 aitem->SetConnectivityDirty();
136 m_schematic->ConnectionGraph()->Merge( new_graph );
138 std::vector<SCH_ITEM*> curr_items = item->ConnectedItems(
path );
139 std::sort( curr_items.begin(), curr_items.end() );
144 <<
": Item " << item->GetFriendlyName().ToStdString()
145 <<
" in net " << netname.ToStdString()
146 <<
" changed from " << prev_items.size() <<
" to " << curr_items.size()
147 <<
" Location:" << item->GetPosition().x <<
"," << item->GetPosition().y );
void Recalculate(const SCH_SHEET_LIST &aSheetList, bool aUnconditional=false, std::function< void(SCH_ITEM *)> *aChangedItemHandler=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
Update the connection graph for the given list of sheets.