simulator: do not show a message saying a command directive has changed

when there is no old command directive.
This commit is contained in:
jean-pierre charras 2023-07-08 19:46:56 +02:00
parent 12ed015174
commit 9ee21e4eeb
1 changed files with 3 additions and 2 deletions

View File

@ -406,8 +406,9 @@ void SIMULATOR_FRAME::StartSimulation()
if( m_panel->GetPlotIndex( plotPanel ) == 0 if( m_panel->GetPlotIndex( plotPanel ) == 0
&& m_circuitModel->GetSchTextSimCommand() != plotPanel->GetLastSchTextSimCommand() ) && m_circuitModel->GetSchTextSimCommand() != plotPanel->GetLastSchTextSimCommand() )
{ {
if( IsOK( this, _( "Schematic sheet simulation command directive has changed. " if( plotPanel->GetLastSchTextSimCommand().IsEmpty()
"Do you wish to update the Simulation Command?" ) ) ) || IsOK( this, _( "Schematic sheet simulation command directive has changed. "
"Do you wish to update the Simulation Command?" ) ) )
{ {
plotPanel->SetSimCommand( m_circuitModel->GetSchTextSimCommand() ); plotPanel->SetSimCommand( m_circuitModel->GetSchTextSimCommand() );
plotPanel->SetLastSchTextSimCommand( plotPanel->GetSimCommand() ); plotPanel->SetLastSchTextSimCommand( plotPanel->GetSimCommand() );