Simulator: when using Incremental Connectivity, ensure the netlist is up to date

This commit is contained in:
jean-pierre charras 2023-05-03 18:57:22 +02:00
parent cd43dccb18
commit 2aa9ea87eb
1 changed files with 5 additions and 0 deletions

View File

@ -60,6 +60,7 @@
#include "fmt/format.h"
#include <dialog_sim_format_value.h>
#include <eeschema_settings.h>
#include <advanced_config.h>
#include <memory>
@ -989,6 +990,10 @@ bool SIMULATOR_FRAME::LoadSimulator()
if( !m_schematicFrame->ReadyToNetlist( _( "Simulator requires a fully annotated schematic." ) ) )
return false;
// If we are using the new connectivity, make sure that we do a full-rebuild
if( ADVANCED_CFG::GetCfg().m_IncrementalConnectivity )
m_schematicFrame->RecalculateConnections( GLOBAL_CLEANUP );
if( !m_simulator->Attach( m_circuitModel, reporter ) )
{
DisplayErrorMessage( this, _( "Errors during netlist generation.\n\n" ) + errors );