From 2a574c4f6580b048abbf7741623b05e73c9ca475 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 3 Dec 2018 17:03:44 -0800 Subject: [PATCH] pcbnew: Synchonize net info when loading via python When loading the load using the UI, netclasses and net info are synchronized to the board object after parsing the file. This needs to happen automatically when loading the board via the Python interface as well. Fixes: lp:1806506 * https://bugs.launchpad.net/kicad/+bug/1806506 --- pcbnew/swig/pcbnew_scripting_helpers.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/swig/pcbnew_scripting_helpers.cpp b/pcbnew/swig/pcbnew_scripting_helpers.cpp index 85a95f4dcd..ae83f3fcfc 100644 --- a/pcbnew/swig/pcbnew_scripting_helpers.cpp +++ b/pcbnew/swig/pcbnew_scripting_helpers.cpp @@ -78,7 +78,12 @@ BOARD* LoadBoard( wxString& aFileName, IO_MGR::PCB_FILE_T aFormat ) BOARD* brd = IO_MGR::Load( aFormat, aFileName ); if( brd ) + { brd->BuildConnectivity(); + brd->BuildListOfNets(); + brd->SynchronizeNetsAndNetClasses(); + } + return brd; }