Python compatibility: move DXF_PLOTTER::DXF_UNITS to DXF_UNITS in pcb_plot_params.h
Fixes #6034 https://gitlab.com/kicad/code/kicad/issues/6034
This commit is contained in:
parent
909dca71cd
commit
c87faad344
|
@ -119,13 +119,6 @@ public:
|
|||
void* aData = NULL ) override;
|
||||
|
||||
|
||||
// Must be in the same order as the drop-down list in the plot dialog inside pcbnew
|
||||
enum class DXF_UNITS
|
||||
{
|
||||
INCHES = 0,
|
||||
MILLIMETERS = 1
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the units to use for plotting the DXF file.
|
||||
*
|
||||
|
|
|
@ -48,6 +48,16 @@ class GBR_NETLIST_METADATA;
|
|||
|
||||
using KIGFX::RENDER_SETTINGS;
|
||||
|
||||
|
||||
// Must be in the same order as the drop-down list in the plot dialog inside pcbnew
|
||||
// Units (inch/mm for DXF plotter
|
||||
enum class DXF_UNITS
|
||||
{
|
||||
INCHES = 0,
|
||||
MILLIMETERS = 1
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The set of supported output plot formats.
|
||||
*
|
||||
|
|
|
@ -196,7 +196,7 @@ void DIALOG_PLOT::init_Dialog()
|
|||
m_DXF_plotTextStrokeFontOpt->SetValue( m_plotOpts.GetTextMode() == PLOT_TEXT_MODE::DEFAULT );
|
||||
|
||||
// DXF units selection
|
||||
m_DXF_plotUnits->SetSelection( static_cast<int>( m_plotOpts.GetDXFPlotUnits() ) );
|
||||
m_DXF_plotUnits->SetSelection( m_plotOpts.GetDXFPlotUnits() == DXF_UNITS::INCHES ? 0 : 1);
|
||||
|
||||
// Plot mirror option
|
||||
m_plotMirrorOpt->SetValue( m_plotOpts.GetMirror() );
|
||||
|
@ -641,7 +641,7 @@ void DIALOG_PLOT::applyPlotSettings()
|
|||
tempOptions.SetDXFPlotPolygonMode( m_DXF_plotModeOpt->GetValue() );
|
||||
|
||||
sel = m_DXF_plotUnits->GetSelection();
|
||||
tempOptions.SetDXFPlotUnits( static_cast<DXF_PLOTTER::DXF_UNITS>( sel ) );
|
||||
tempOptions.SetDXFPlotUnits( sel == 0 ? DXF_UNITS::INCHES : DXF_UNITS::MILLIMETERS );
|
||||
|
||||
tempOptions.SetPlotViaOnMaskLayer( m_plotNoViaOnMaskOpt->GetValue() );
|
||||
|
||||
|
|
|
@ -160,9 +160,9 @@ bool GENDRILL_WRITER_BASE::genDrillMapFile( const wxString& aFullFileName, PLOT_
|
|||
DXF_PLOTTER* dxf_plotter = new DXF_PLOTTER;
|
||||
|
||||
if( m_unitsMetric )
|
||||
dxf_plotter->SetUnits( DXF_PLOTTER::DXF_UNITS::MILLIMETERS );
|
||||
dxf_plotter->SetUnits( DXF_UNITS::MILLIMETERS );
|
||||
else
|
||||
dxf_plotter->SetUnits( DXF_PLOTTER::DXF_UNITS::INCHES );
|
||||
dxf_plotter->SetUnits( DXF_UNITS::INCHES );
|
||||
|
||||
plotter = dxf_plotter;
|
||||
plotter->SetPageSettings( page_info );
|
||||
|
|
|
@ -111,7 +111,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
|
|||
m_plotViaOnMaskLayer = false;
|
||||
m_plotMode = FILLED;
|
||||
m_DXFplotPolygonMode = true;
|
||||
m_DXFplotUnits = DXF_PLOTTER::DXF_UNITS::INCHES;
|
||||
m_DXFplotUnits = DXF_UNITS::INCHES;
|
||||
m_useAuxOrigin = false;
|
||||
m_HPGLPenNum = 1;
|
||||
m_HPGLPenSpeed = 20; // this param is always in cm/s
|
||||
|
|
|
@ -64,7 +64,7 @@ private:
|
|||
/**
|
||||
* DXF format: Units to use when plotting the DXF
|
||||
*/
|
||||
DXF_PLOTTER::DXF_UNITS m_DXFplotUnits;
|
||||
DXF_UNITS m_DXFplotUnits;
|
||||
|
||||
/// Plot format type (chooses the driver to be used)
|
||||
PLOT_FORMAT m_format;
|
||||
|
@ -229,12 +229,12 @@ public:
|
|||
void SetDXFPlotPolygonMode( bool aFlag ) { m_DXFplotPolygonMode = aFlag; }
|
||||
bool GetDXFPlotPolygonMode() const { return m_DXFplotPolygonMode; }
|
||||
|
||||
void SetDXFPlotUnits( DXF_PLOTTER::DXF_UNITS aUnit )
|
||||
void SetDXFPlotUnits( DXF_UNITS aUnit )
|
||||
{
|
||||
m_DXFplotUnits = aUnit;
|
||||
}
|
||||
|
||||
DXF_PLOTTER::DXF_UNITS GetDXFPlotUnits() const
|
||||
DXF_UNITS GetDXFPlotUnits() const
|
||||
{
|
||||
return m_DXFplotUnits;
|
||||
}
|
||||
|
|
|
@ -1029,8 +1029,7 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, PCB_PLOT_PARAMS *aPlotOpts, int aLayer,
|
|||
case PLOT_FORMAT::DXF:
|
||||
DXF_PLOTTER* DXF_plotter;
|
||||
DXF_plotter = new DXF_PLOTTER();
|
||||
DXF_plotter->SetUnits(
|
||||
static_cast<DXF_PLOTTER::DXF_UNITS>( aPlotOpts->GetDXFPlotUnits() ) );
|
||||
DXF_plotter->SetUnits( aPlotOpts->GetDXFPlotUnits() );
|
||||
|
||||
plotter = DXF_plotter;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue