mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-19 22:51:40 +00:00
Fix output paths for sch plots again
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19522
This commit is contained in:
parent
31cce8930a
commit
c931f2e16a
@ -63,8 +63,8 @@ NLOHMANN_JSON_SERIALIZE_ENUM( SCH_PLOT_FORMAT,
|
||||
{ SCH_PLOT_FORMAT::DXF, "dxf" },
|
||||
} )
|
||||
|
||||
JOB_EXPORT_SCH_PLOT::JOB_EXPORT_SCH_PLOT() :
|
||||
JOB( "plot", false ),
|
||||
JOB_EXPORT_SCH_PLOT::JOB_EXPORT_SCH_PLOT( bool aOutputIsDirectory ) :
|
||||
JOB( "plot", aOutputIsDirectory ),
|
||||
m_plotFormat( SCH_PLOT_FORMAT::PDF ),
|
||||
m_filename(),
|
||||
m_drawingSheet(),
|
||||
@ -111,7 +111,7 @@ JOB_EXPORT_SCH_PLOT::JOB_EXPORT_SCH_PLOT() :
|
||||
|
||||
|
||||
JOB_EXPORT_SCH_PLOT_PDF::JOB_EXPORT_SCH_PLOT_PDF() :
|
||||
JOB_EXPORT_SCH_PLOT()
|
||||
JOB_EXPORT_SCH_PLOT( false )
|
||||
{
|
||||
m_plotFormat = SCH_PLOT_FORMAT::PDF;
|
||||
}
|
||||
@ -130,7 +130,7 @@ wxString JOB_EXPORT_SCH_PLOT_PDF::GetSettingsDialogTitle() const
|
||||
|
||||
|
||||
JOB_EXPORT_SCH_PLOT_DXF ::JOB_EXPORT_SCH_PLOT_DXF () :
|
||||
JOB_EXPORT_SCH_PLOT()
|
||||
JOB_EXPORT_SCH_PLOT( true )
|
||||
{
|
||||
m_plotFormat = SCH_PLOT_FORMAT::DXF;
|
||||
}
|
||||
@ -149,7 +149,7 @@ wxString JOB_EXPORT_SCH_PLOT_DXF::GetSettingsDialogTitle() const
|
||||
|
||||
|
||||
JOB_EXPORT_SCH_PLOT_SVG::JOB_EXPORT_SCH_PLOT_SVG() :
|
||||
JOB_EXPORT_SCH_PLOT()
|
||||
JOB_EXPORT_SCH_PLOT( true )
|
||||
{
|
||||
m_plotFormat = SCH_PLOT_FORMAT::SVG;
|
||||
}
|
||||
@ -168,7 +168,7 @@ wxString JOB_EXPORT_SCH_PLOT_SVG::GetSettingsDialogTitle() const
|
||||
|
||||
|
||||
JOB_EXPORT_SCH_PLOT_PS::JOB_EXPORT_SCH_PLOT_PS() :
|
||||
JOB_EXPORT_SCH_PLOT()
|
||||
JOB_EXPORT_SCH_PLOT( true )
|
||||
{
|
||||
m_plotFormat = SCH_PLOT_FORMAT::POST;
|
||||
}
|
||||
@ -187,7 +187,7 @@ wxString JOB_EXPORT_SCH_PLOT_PS::GetSettingsDialogTitle() const
|
||||
|
||||
|
||||
JOB_EXPORT_SCH_PLOT_HPGL::JOB_EXPORT_SCH_PLOT_HPGL() :
|
||||
JOB_EXPORT_SCH_PLOT()
|
||||
JOB_EXPORT_SCH_PLOT( true )
|
||||
{
|
||||
m_plotFormat = SCH_PLOT_FORMAT::HPGL;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ enum class SCH_PLOT_FORMAT
|
||||
class KICOMMON_API JOB_EXPORT_SCH_PLOT : public JOB
|
||||
{
|
||||
public:
|
||||
JOB_EXPORT_SCH_PLOT();
|
||||
JOB_EXPORT_SCH_PLOT( bool aOutputIsDirectory );
|
||||
|
||||
SCH_PLOT_FORMAT m_plotFormat;
|
||||
wxString m_filename;
|
||||
|
@ -148,8 +148,18 @@ int CLI::SCH_EXPORT_PLOT_COMMAND::doPerform( KIWAY& aKiway )
|
||||
pages.push_back( tokenizer.GetNextToken().Trim() );
|
||||
}
|
||||
|
||||
std::unique_ptr<JOB_EXPORT_SCH_PLOT> plotJob =
|
||||
std::make_unique<JOB_EXPORT_SCH_PLOT>();
|
||||
std::unique_ptr<JOB_EXPORT_SCH_PLOT> plotJob;
|
||||
|
||||
switch( m_plotFormat )
|
||||
{
|
||||
case SCH_PLOT_FORMAT::PDF: plotJob = std::make_unique<JOB_EXPORT_SCH_PLOT_PDF>(); break;
|
||||
case SCH_PLOT_FORMAT::DXF: plotJob = std::make_unique<JOB_EXPORT_SCH_PLOT_DXF>(); break;
|
||||
case SCH_PLOT_FORMAT::SVG: plotJob = std::make_unique<JOB_EXPORT_SCH_PLOT_SVG>(); break;
|
||||
case SCH_PLOT_FORMAT::POST: plotJob = std::make_unique<JOB_EXPORT_SCH_PLOT_PS>(); break;
|
||||
case SCH_PLOT_FORMAT::HPGL: plotJob = std::make_unique<JOB_EXPORT_SCH_PLOT_HPGL>(); break;
|
||||
}
|
||||
|
||||
|
||||
plotJob->m_filename = filename;
|
||||
plotJob->m_plotFormat = m_plotFormat;
|
||||
plotJob->m_plotPages = pages;
|
||||
|
Loading…
Reference in New Issue
Block a user