Fixes: lp:1803623
* https://bugs.launchpad.net/kicad/+bug/1803623
---
pcbnew/swig/board.i | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/pcbnew/swig/board.i b/pcbnew/swig/board.i
index 91c41cc90..3bdc1e610 100644
--- a/pcbnew/swig/board.i
+++ b/pcbnew/swig/board.i
@@ -173,11 +173,10 @@ HANDLE_EXCEPTIONS(BOARD::TracksInNetBetweenPoints)
GetNetClasses(BOARD self) -> { wxString net_class_name : NETCLASSPTR }
Include the "Default" netclass also.
"""
- netclassmap = self.GetNetClasses().NetClasses()
- # Add the Default one too, but this is probably modifying the NETCLASS_MAP
- # in the BOARD. If that causes trouble, could make a deepcopy() here first.
- # netclassmap = deepcopy(netclassmap)
+ # Copy the NETCLASS_MAP so the one in the BOARD isn't modified
+ # when we add the Default net class.
+ netclassmap = {k:v for k,v in self.GetNetClasses().NetClasses().items()}
netclassmap['Default'] = self.GetNetClasses().GetDefault()
return netclassmap
%}
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp