Commit 64288367 authored by Marco Mattila's avatar Marco Mattila

Fix postscript output option in pcbnew plot dialog.

parent 521d43c4
......@@ -272,8 +272,8 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_plotPSNegativeOpt = new wxCheckBox( this, wxID_ANY, _("Negative plot"), wxDefaultPosition, wxDefaultSize, 0 );
m_PSOptionsSizer->Add( m_plotPSNegativeOpt, 0, wxALL, 2 );
m_usePsA4Opt = new wxCheckBox( this, wxID_ANY, _("Force A4 paper size"), wxDefaultPosition, wxDefaultSize, 0 );
m_PSOptionsSizer->Add( m_usePsA4Opt, 0, wxALL, 2 );
m_forcePSA4OutputOpt = new wxCheckBox( this, wxID_ANY, _("Force A4 output"), wxDefaultPosition, wxDefaultSize, 0 );
m_PSOptionsSizer->Add( m_forcePSA4OutputOpt, 0, wxALL, 2 );
m_PlotOptionsSizer->Add( m_PSOptionsSizer, 0, wxALL|wxEXPAND, 3 );
......
......@@ -3457,14 +3457,14 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Force A4 paper size</property>
<property name="label">Force A4 output</property>
<property name="layer"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_usePsA4Opt</property>
<property name="name">m_forcePSA4OutputOpt</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
......
......@@ -84,7 +84,7 @@ class DIALOG_PLOT_BASE : public wxDialog
wxStaticText* m_staticText8;
wxTextCtrl* m_fineAdjustYscaleOpt;
wxCheckBox* m_plotPSNegativeOpt;
wxCheckBox* m_usePsA4Opt;
wxCheckBox* m_forcePSA4OutputOpt;
wxStaticText* m_staticText2;
wxTextCtrl* m_messagesBox;
......
......@@ -86,6 +86,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
m_HPGLPenOvr = 2;
m_PlotPSColorOpt = true;
m_PlotPSNegative = false;
psA4Output = false;
m_PlotReference = true;
m_PlotValue = true;
m_PlotTextOther = true;
......@@ -139,6 +140,8 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
m_PlotPSColorOpt ? trueStr : falseStr );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_psnegative ),
m_PlotPSNegative ? trueStr : falseStr );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_psa4output ),
psA4Output ? trueStr : falseStr );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotreference ),
m_PlotReference ? trueStr : falseStr );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotvalue ),
......@@ -201,6 +204,8 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
return false;
if( m_PlotPSNegative != aPcbPlotParams.m_PlotPSNegative )
return false;
if( psA4Output != aPcbPlotParams.psA4Output )
return false;
if( m_PlotReference != aPcbPlotParams.m_PlotReference )
return false;
if( m_PlotValue != aPcbPlotParams.m_PlotValue )
......@@ -296,6 +301,9 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) throw( IO_
case T_usegerberextensions:
aPcbPlotParams->useGerberExtensions = ParseBool();
break;
case T_psa4output:
aPcbPlotParams->psA4Output = ParseBool();
break;
case T_excludeedgelayer:
aPcbPlotParams->m_ExcludeEdgeLayer = ParseBool();
break;
......
......@@ -90,6 +90,7 @@ private:
bool useGerberExtensions;
bool useAuxOrigin;
bool subtractMaskFromSilk;
bool psA4Output;
int scaleSelection;
wxString outputDirectory;
......@@ -116,6 +117,8 @@ public:
bool GetUseAuxOrigin() const { return useAuxOrigin; };
void SetScaleSelection( int aSelection ) { scaleSelection = aSelection; };
int GetScaleSelection() const { return scaleSelection; };
void SetPsA4Output( int aForce ) { psA4Output = aForce; };
bool GetPsA4Output() const { return psA4Output; };
int GetHpglPenDiameter() const { return m_HPGLPenDiam; };
bool SetHpglPenDiameter( int aValue );
......
......@@ -18,6 +18,7 @@ plotinvisibletext
plotothertext
plotreference
plotvalue
psa4output
pscolor
psnegative
scaleselection
......
......@@ -141,6 +141,7 @@ void DIALOG_PLOT::Init_Dialog()
m_fineAdjustYscaleOpt->AppendText( msg );
m_plotPSNegativeOpt->SetValue( g_PcbPlotOptions.m_PlotPSNegative );
m_forcePSA4OutputOpt->SetValue( g_PcbPlotOptions.GetPsA4Output() );
// List layers in same order than in setup layers dialog
// (Front or Top to Back or Bottom)
......@@ -514,6 +515,7 @@ void DIALOG_PLOT::applyPlotSettings()
tempOptions.SetLayerSelection( selectedLayers );
tempOptions.m_PlotPSNegative = m_plotPSNegativeOpt->GetValue();
tempOptions.SetPsA4Output( m_forcePSA4OutputOpt->GetValue() );
// Set output directory and replace backslashes with forward ones
wxString dirStr;
......@@ -732,7 +734,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
{
case PLOT_FORMAT_POST:
success = m_Parent->Genere_PS( fn.GetFullPath(), layer,
m_usePsA4Opt->GetValue(),
g_PcbPlotOptions.GetPsA4Output(),
g_PcbPlotOptions.m_PlotMode );
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment