Skip to content
Snippets Groups Projects
Commit 3a29fa44 authored by Seth Hillbrand's avatar Seth Hillbrand :flag_il:
Browse files

Ensure that missing pins are added to extraction

When changing from a larger part to a smaller part, the previously
existing pins may be removed from the screen but still linked to
elements in the connection graph because we don't set them dirty unless
the changed element overlaps

Fixes #17851

(cherry picked from commit 0cd3e17d)
parent 3517d25a
No related branches found
No related tags found
Loading
Pipeline #1265332931 failed
......@@ -1736,6 +1736,26 @@ void SCH_EDIT_FRAME::RecalculateConnections( SCH_COMMIT* aCommit, SCH_CLEANUP_FL
pts.insert( pts.end(), tmp_pts.begin(), tmp_pts.end() );
changed_items.insert( item );
for( SCH_SHEET_PATH& path : paths )
item_paths.insert( std::make_pair( path, item ) );
item = dynamic_cast<SCH_ITEM*>( changed_list->GetPickedItemLink( ii ) );
if( !item || !item->IsConnectable() )
continue;
tmp_pts = item->GetConnectionPoints();
pts.insert( pts.end(), tmp_pts.begin(), tmp_pts.end() );
changed_items.insert( item );
// We have to directly add the pins here because the link may not exist on the schematic
// anymore and so won't be picked up by GetScreen()->Items().Overlapping() below.
if( SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( item ) )
{
std::vector<SCH_PIN*> pins = symbol->GetPins();
changed_items.insert( pins.begin(), pins.end() );
}
for( SCH_SHEET_PATH& path : paths )
item_paths.insert( std::make_pair( path, item ) );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment