Eeschema: ensure the netlist data is up to date before generating the netlist
Fixes #4779 https://gitlab.com/kicad/code/kicad/issues/4779
This commit is contained in:
parent
2f01dedb69
commit
cf38d382c7
|
@ -43,6 +43,7 @@
|
||||||
#include <netlist_exporters/netlist_exporter_kicad.h>
|
#include <netlist_exporters/netlist_exporter_kicad.h>
|
||||||
#include <tools/ee_actions.h>
|
#include <tools/ee_actions.h>
|
||||||
#include <tools/sch_editor_control.h>
|
#include <tools/sch_editor_control.h>
|
||||||
|
#include <advanced_config.h>
|
||||||
|
|
||||||
|
|
||||||
SCH_ITEM* SCH_EDITOR_CONTROL::FindComponentAndItem( const wxString& aReference,
|
SCH_ITEM* SCH_EDITOR_CONTROL::FindComponentAndItem( const wxString& aReference,
|
||||||
|
@ -467,6 +468,11 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
|
||||||
NETLIST_EXPORTER_KICAD exporter( &Schematic() );
|
NETLIST_EXPORTER_KICAD exporter( &Schematic() );
|
||||||
STRING_FORMATTER formatter;
|
STRING_FORMATTER formatter;
|
||||||
|
|
||||||
|
// TODO remove once real-time connectivity is a given
|
||||||
|
if( !ADVANCED_CFG::GetCfg().m_realTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||||
|
// Ensure the netlist data is up to date:
|
||||||
|
RecalculateConnections( NO_CLEANUP );
|
||||||
|
|
||||||
exporter.Format( &formatter, GNL_ALL | GNL_OPT_KICAD );
|
exporter.Format( &formatter, GNL_ALL | GNL_OPT_KICAD );
|
||||||
|
|
||||||
payload = formatter.GetString();
|
payload = formatter.GetString();
|
||||||
|
|
|
@ -48,6 +48,9 @@ bool SCH_EDIT_FRAME::WriteNetListFile( int aFormat, const wxString& aFullFileNam
|
||||||
// Ensure all power symbols have a valid reference
|
// Ensure all power symbols have a valid reference
|
||||||
Schematic().GetSheets().AnnotatePowerSymbols();
|
Schematic().GetSheets().AnnotatePowerSymbols();
|
||||||
|
|
||||||
|
// Ensure the netlist data is up to date:
|
||||||
|
RecalculateConnections( NO_CLEANUP );
|
||||||
|
|
||||||
if( !ReadyToNetlist( false ) )
|
if( !ReadyToNetlist( false ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue