49 std::vector<wxString> tests = {
65 for(
const wxString&
test : tests )
69 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
73 for(
size_t ii = 0; ii <
path.size(); ++ii )
77 std::vector<SCH_ITEM*> items;
81 if( !item->IsConnectable() )
90 items.push_back(
pin );
95 items.push_back( item );
101 const std::vector<SCH_ITEM*>& conn_items = item->ConnectedItems(
path );
103 wxString netname = conn ? conn->
GetNetName().ToStdString() : wxString(
"NoNet" );
107 <<
": Item " << item->GetFriendlyName().ToStdString()
108 <<
" in net " << netname.ToStdString() <<
" subgraph " << subgraph
109 <<
" has " << conn_items.size() <<
" connections" );
114 if( !item->IsConnectable() )
117 std::vector<SCH_ITEM*> prev_items = item->ConnectedItems(
path );
118 std::sort( prev_items.begin(), prev_items.end() );
121 std::set<std::pair<SCH_SHEET_PATH, SCH_ITEM*>> all_items =
122 m_schematic->ConnectionGraph()->ExtractAffectedItems( { item } );
123 all_items.insert( {
path, item } );
125 <<
": Item " << item->GetFriendlyName().ToStdString()
126 <<
" in net " << netname.ToStdString()
127 <<
" has " << all_items.size() <<
" affected items" );
131 new_graph.
SetLastCodes( m_schematic->ConnectionGraph() );
133 for(
auto&[ apath, aitem ] : all_items )
135 wxCHECK2( aitem,
continue );
136 aitem->SetConnectivityDirty();
140 m_schematic->ConnectionGraph()->Merge( new_graph );
142 std::vector<SCH_ITEM*> curr_items = item->ConnectedItems(
path );
143 std::sort( curr_items.begin(), curr_items.end() );
148 <<
": Item " << item->GetFriendlyName().ToStdString()
149 <<
" in net " << netname.ToStdString()
150 <<
" changed from " << prev_items.size() <<
" to " << curr_items.size()
151 <<
" 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.