eeschema: Limit normalization on load

When loading a new file, we do not want to add junctions where they did
not exist before.  This could generate invalid netlists by breaking a
wire at a pin connection point.

We do break/add connections when the user modifies the schematic but
this happens while the user is actively working with the component and
sees the action.

Fixes: lp:1830411
* https://bugs.launchpad.net/kicad/+bug/1830411
This commit is contained in:
Seth Hillbrand 2019-05-27 13:29:20 -07:00
parent 10b0b18d80
commit 0b629b4bd4
1 changed files with 4 additions and 6 deletions

View File

@ -272,15 +272,13 @@ bool SCH_EDIT_FRAME::AddMissingJunctions( SCH_SCREEN* aScreen )
void SCH_EDIT_FRAME::NormalizeSchematicOnFirstLoad( bool recalculateConnections )
{
if( recalculateConnections )
RecalculateConnections();
else
SchematicCleanUp();
SCH_SHEET_LIST list( g_RootSheet );
for( const auto& sheet : list )
AddMissingJunctions( sheet.LastScreen() );
SchematicCleanUp( sheet.LastScreen() );
if( recalculateConnections )
RecalculateConnections( false );
}