Commit 4265fa60 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Pcbnew - plot dialog: fix Bug #1417435 (Gerber(and some others) plot mode is...

Pcbnew - plot dialog: fix Bug #1417435 (Gerber(and some others)  plot mode is fixed as”sketch” instead of "filled" )
parent 01fdbdf9
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -193,7 +193,7 @@ void DIALOG_PLOT::Init_Dialog()
    m_scaleOpt->SetSelection( m_plotOpts.GetScaleSelection() );
    m_scaleOpt->SetSelection( m_plotOpts.GetScaleSelection() );


    // Plot mode
    // Plot mode
    m_plotModeOpt->SetSelection( m_plotOpts.GetPlotMode() == SKETCH ? 1 : 0 );
    setPlotModeChoiceSelection( m_plotOpts.GetPlotMode() );


    // Plot mirror option
    // Plot mirror option
    m_plotMirrorOpt->SetValue( m_plotOpts.GetMirror() );
    m_plotMirrorOpt->SetValue( m_plotOpts.GetMirror() );
@@ -335,7 +335,7 @@ void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
}
}




PlotFormat DIALOG_PLOT::GetPlotFormat()
PlotFormat DIALOG_PLOT::getPlotFormat()
{
{
    // plot format id's are ordered like displayed in m_plotFormatOpt
    // plot format id's are ordered like displayed in m_plotFormatOpt
    static const PlotFormat plotFmt[] =
    static const PlotFormat plotFmt[] =
@@ -356,13 +356,13 @@ PlotFormat DIALOG_PLOT::GetPlotFormat()
// and clear also some optional values
// and clear also some optional values
void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
{
{
    switch( GetPlotFormat() )
    switch( getPlotFormat() )
    {
    {
    case PLOT_FORMAT_PDF:
    case PLOT_FORMAT_PDF:
    case PLOT_FORMAT_SVG:
    case PLOT_FORMAT_SVG:
        m_drillShapeOpt->Enable( true );
        m_drillShapeOpt->Enable( true );
        m_plotModeOpt->Enable( false );
        m_plotModeOpt->Enable( false );
        m_plotModeOpt->SetSelection( 1 );
        setPlotModeChoiceSelection( FILLED );
        m_plotMirrorOpt->Enable( true );
        m_plotMirrorOpt->Enable( true );
        m_useAuxOriginCheckBox->Enable( false );
        m_useAuxOriginCheckBox->Enable( false );
        m_useAuxOriginCheckBox->SetValue( false );
        m_useAuxOriginCheckBox->SetValue( false );
@@ -422,7 +422,7 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
        m_drillShapeOpt->Enable( false );
        m_drillShapeOpt->Enable( false );
        m_drillShapeOpt->SetSelection( 0 );
        m_drillShapeOpt->SetSelection( 0 );
        m_plotModeOpt->Enable( false );
        m_plotModeOpt->Enable( false );
        m_plotModeOpt->SetSelection( 1 );
        setPlotModeChoiceSelection( FILLED );
        m_plotMirrorOpt->Enable( false );
        m_plotMirrorOpt->Enable( false );
        m_plotMirrorOpt->SetValue( false );
        m_plotMirrorOpt->SetValue( false );
        m_useAuxOriginCheckBox->Enable( true );
        m_useAuxOriginCheckBox->Enable( true );
@@ -669,7 +669,7 @@ void DIALOG_PLOT::applyPlotSettings()
    ConfigBaseWriteDouble( m_config, CONFIG_PS_FINEWIDTH_ADJ,
    ConfigBaseWriteDouble( m_config, CONFIG_PS_FINEWIDTH_ADJ,
                           (double)m_PSWidthAdjust / IU_PER_MM );
                           (double)m_PSWidthAdjust / IU_PER_MM );


    tempOptions.SetFormat( GetPlotFormat() );
    tempOptions.SetFormat( getPlotFormat() );


    tempOptions.SetUseGerberExtensions( m_useGerberExtensions->GetValue() );
    tempOptions.SetUseGerberExtensions( m_useGerberExtensions->GetValue() );
    tempOptions.SetUseGerberAttributes( m_useGerberAttributes->GetValue() );
    tempOptions.SetUseGerberAttributes( m_useGerberAttributes->GetValue() );
+10 −2
Original line number Original line Diff line number Diff line
@@ -57,6 +57,7 @@ private:


    PCB_PLOT_PARAMS     m_plotOpts;
    PCB_PLOT_PARAMS     m_plotOpts;


    // Event called functions
    void        Init_Dialog();
    void        Init_Dialog();
    void        Plot( wxCommandEvent& event );
    void        Plot( wxCommandEvent& event );
    void        OnQuit( wxCommandEvent& event );
    void        OnQuit( wxCommandEvent& event );
@@ -66,7 +67,14 @@ private:
    void        OnPopUpLayers( wxCommandEvent& event );
    void        OnPopUpLayers( wxCommandEvent& event );
    void        SetPlotFormat( wxCommandEvent& event );
    void        SetPlotFormat( wxCommandEvent& event );
    void        OnSetScaleOpt( wxCommandEvent& event );
    void        OnSetScaleOpt( wxCommandEvent& event );
    void        applyPlotSettings();
    void        CreateDrillFile( wxCommandEvent& event );
    void        CreateDrillFile( wxCommandEvent& event );
    PlotFormat  GetPlotFormat();

    // orther functions
    void        applyPlotSettings();
    PlotFormat  getPlotFormat();

    void        setPlotModeChoiceSelection( EDA_DRAW_MODE_T aPlotMode )
    {
        m_plotModeOpt->SetSelection( aPlotMode == SKETCH ? 1 : 0 );
    }
};
};