Escape CR and LF in Spice simulation command when saved
This commit is contained in:
parent
bd1f3d85f4
commit
87441e256c
|
@ -35,6 +35,7 @@
|
||||||
#include <wildcards_and_files_ext.h>
|
#include <wildcards_and_files_ext.h>
|
||||||
#include <widgets/tuner_slider.h>
|
#include <widgets/tuner_slider.h>
|
||||||
#include <dialogs/dialog_signal_list.h>
|
#include <dialogs/dialog_signal_list.h>
|
||||||
|
#include "kicad_string.h"
|
||||||
#include "netlist_exporter_pspice_sim.h"
|
#include "netlist_exporter_pspice_sim.h"
|
||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
#include "ngspice.h"
|
#include "ngspice.h"
|
||||||
|
@ -948,7 +949,7 @@ bool SIM_PLOT_FRAME::loadWorkbook( const wxString& aPath )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString simCommand = file.GetNextLine();
|
wxString simCommand = UnescapeString( file.GetNextLine() );
|
||||||
NewPlotPanel( simCommand );
|
NewPlotPanel( simCommand );
|
||||||
StartSimulation( simCommand );
|
StartSimulation( simCommand );
|
||||||
|
|
||||||
|
@ -1058,7 +1059,7 @@ bool SIM_PLOT_FRAME::saveWorkbook( const wxString& aPath )
|
||||||
}
|
}
|
||||||
|
|
||||||
file.AddLine( wxString::Format( "%d", basePanel->GetType() ) );
|
file.AddLine( wxString::Format( "%d", basePanel->GetType() ) );
|
||||||
file.AddLine( m_workbook->GetSimCommand( basePanel ) );
|
file.AddLine( EscapeString( m_workbook->GetSimCommand( basePanel ), CTX_LINE ) );
|
||||||
|
|
||||||
const SIM_PLOT_PANEL* plotPanel = dynamic_cast<const SIM_PLOT_PANEL*>( basePanel );
|
const SIM_PLOT_PANEL* plotPanel = dynamic_cast<const SIM_PLOT_PANEL*>( basePanel );
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
#include <sim/sim_workbook.h>
|
#include <sim/sim_workbook.h>
|
||||||
|
|
||||||
|
|
||||||
SIM_WORKBOOK::SIM_WORKBOOK() = default;
|
SIM_WORKBOOK::SIM_WORKBOOK() : wxAuiNotebook()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
SIM_WORKBOOK::SIM_WORKBOOK( wxWindow* aParent, wxWindowID aId, const wxPoint& aPos, const wxSize&
|
SIM_WORKBOOK::SIM_WORKBOOK( wxWindow* aParent, wxWindowID aId, const wxPoint& aPos, const wxSize&
|
||||||
|
|
Loading…
Reference in New Issue