From e5877e084063703c1c40cb7fc2811eb1445133e1 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 25 Nov 2022 08:55:21 +0100 Subject: [PATCH] netlist_exporter_xml: ensure the list of parts is included in netlist. This is obviously mandatory to build a BOM DIALOG_BOM: generate a full xml netlis. We don't know what is needed by scripts Fixes #12918 https://gitlab.com/kicad/code/kicad/issues/12918 --- eeschema/dialogs/dialog_bom.cpp | 2 +- eeschema/netlist_exporters/netlist_exporter_xml.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/dialogs/dialog_bom.cpp b/eeschema/dialogs/dialog_bom.cpp index a6bf15e1d2..cb8cfb3a1c 100644 --- a/eeschema/dialogs/dialog_bom.cpp +++ b/eeschema/dialogs/dialog_bom.cpp @@ -342,7 +342,7 @@ void DIALOG_BOM::OnRunGenerator( wxCommandEvent& event ) #endif if( m_parent->ReadyToNetlist( _( "Generating BOM requires a fully annotated schematic." ) ) ) - m_parent->WriteNetListFile( NET_TYPE_BOM, fullfilename, GNL_OPT_BOM, &reporter ); + m_parent->WriteNetListFile( NET_TYPE_BOM, fullfilename, GNL_OPT_BOM|GNL_ALL, &reporter ); m_Messages->SetValue( reportmsg ); diff --git a/eeschema/netlist_exporters/netlist_exporter_xml.cpp b/eeschema/netlist_exporters/netlist_exporter_xml.cpp index cf8b969bf5..2f282fecf6 100644 --- a/eeschema/netlist_exporters/netlist_exporter_xml.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_xml.cpp @@ -53,12 +53,12 @@ bool NETLIST_EXPORTER_XML::WriteNetlist( const wxString& aOutFileName, unsigned if( !stream.IsOk() ) return false; - wxXmlDocument xdoc; + wxXmlDocument xdoc; unsigned aCtl = aNetlistOptions; if( aNetlistOptions & GNL_OPT_BOM ) - aCtl |= ( GNL_SYMBOLS | GNL_HEADER ); + aCtl |= ( GNL_SYMBOLS | GNL_HEADER | GNL_PARTS ); else aCtl |= GNL_ALL;