From 9ee21e4eeb3a75ce4b5dc2bcd27c9764000fd490 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 8 Jul 2023 19:46:56 +0200 Subject: [PATCH] simulator: do not show a message saying a command directive has changed when there is no old command directive. --- eeschema/sim/simulator_frame.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eeschema/sim/simulator_frame.cpp b/eeschema/sim/simulator_frame.cpp index 67891a3671..c6185b8538 100644 --- a/eeschema/sim/simulator_frame.cpp +++ b/eeschema/sim/simulator_frame.cpp @@ -406,8 +406,9 @@ void SIMULATOR_FRAME::StartSimulation() if( m_panel->GetPlotIndex( plotPanel ) == 0 && m_circuitModel->GetSchTextSimCommand() != plotPanel->GetLastSchTextSimCommand() ) { - if( IsOK( this, _( "Schematic sheet simulation command directive has changed. " - "Do you wish to update the Simulation Command?" ) ) ) + if( plotPanel->GetLastSchTextSimCommand().IsEmpty() + || IsOK( this, _( "Schematic sheet simulation command directive has changed. " + "Do you wish to update the Simulation Command?" ) ) ) { plotPanel->SetSimCommand( m_circuitModel->GetSchTextSimCommand() ); plotPanel->SetLastSchTextSimCommand( plotPanel->GetSimCommand() );