From f0790efd398c48135eee30a82b2f4b19559d748a Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 6 Dec 2010 16:18:39 -0600 Subject: [PATCH] fixups for dialog and formatting to Marco's patch --- include/plot_common.h | 3 ++- pcbnew/dialogs/dialog_plot_base.cpp | 17 +++++++++-------- pcbnew/dialogs/dialog_plot_base.fbp | 20 ++++++++++---------- pcbnew/dialogs/dialog_plot_base.h | 4 ++-- pcbnew/plot_rtn.cpp | 2 ++ 5 files changed, 25 insertions(+), 21 deletions(-) diff --git a/include/plot_common.h b/include/plot_common.h index 3e60912d74..2f68840469 100644 --- a/include/plot_common.h +++ b/include/plot_common.h @@ -169,7 +169,8 @@ public: bool aBold ); void marker( const wxPoint& position, int diametre, int aShapeId ); - /** Function SetLayerPolarity + /** + * Function SetLayerPolarity * sets current Gerber layer polarity to positive or negative * by writing \%LPD*\% or \%LPC*\% to the Gerber file, respectively. * param @aPositive = layer polarity, true for positive diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index 321862a5f1..aba3e0a2d1 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Oct 18 2009) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -74,7 +74,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bLeftSizer->Add( m_Plot_Invisible_Text, 0, wxALL, 5 ); - bUpperSizer->Add( bLeftSizer, 1, wxEXPAND, 5 ); + bUpperSizer->Add( bLeftSizer, 2, wxEXPAND, 5 ); wxBoxSizer* bPlotOptionsSizer; bPlotOptionsSizer = new wxBoxSizer( wxVERTICAL ); @@ -103,7 +103,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_Choice_Plot_Offset->SetSelection( 0 ); bPlotOptionsSizer->Add( m_Choice_Plot_Offset, 0, wxALL|wxEXPAND, 5 ); - bUpperSizer->Add( bPlotOptionsSizer, 0, wxEXPAND, 5 ); + bUpperSizer->Add( bPlotOptionsSizer, 1, 0, 5 ); wxBoxSizer* bSizerFmtPlot; bSizerFmtPlot = new wxBoxSizer( wxVERTICAL ); @@ -142,7 +142,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_HPGL_OptionsBox->Add( m_HPGLPenOverlayOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - bSizerFmtPlot->Add( m_HPGL_OptionsBox, 0, wxEXPAND, 5 ); + bSizerFmtPlot->Add( m_HPGL_OptionsBox, 1, wxEXPAND, 5 ); wxStaticBoxSizer* sbSizerPSOpt; sbSizerPSOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("PS Options:") ), wxVERTICAL ); @@ -150,7 +150,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_Plot_PS_Negative = new wxCheckBox( this, wxID_ANY, _("Plot negative"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizerPSOpt->Add( m_Plot_PS_Negative, 0, wxALL, 5 ); - bSizerFmtPlot->Add( sbSizerPSOpt, 0, wxEXPAND, 5 ); + bSizerFmtPlot->Add( sbSizerPSOpt, 1, wxEXPAND, 5 ); wxStaticBoxSizer* sbSizerOutputDir; sbSizerOutputDir = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Output Directory:") ), wxVERTICAL ); @@ -161,9 +161,9 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_BrowseButton = new wxButton( this, ID_BROWSE_OUTPUT_DIRECTORY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); sbSizerOutputDir->Add( m_BrowseButton, 0, wxALL, 5 ); - bSizerFmtPlot->Add( sbSizerOutputDir, 0, wxEXPAND, 5 ); + bSizerFmtPlot->Add( sbSizerOutputDir, 1, wxEXPAND, 5 ); - bUpperSizer->Add( bSizerFmtPlot, 0, wxEXPAND, 5 ); + bUpperSizer->Add( bSizerFmtPlot, 1, wxEXPAND, 5 ); wxBoxSizer* bButtonsSizer; bButtonsSizer = new wxBoxSizer( wxVERTICAL ); @@ -220,7 +220,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 ); bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - bUpperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + bUpperSizer->Add( bButtonsSizer, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 ); @@ -235,6 +235,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr this->SetSizer( bMainSizer ); this->Layout(); + bMainSizer->Fit( this ); // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnCloseWindow ) ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index f1afb6a783..26a75f206c 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -37,7 +37,7 @@ -1,350 DIALOG_PLOT_BASE - 575,590 + -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER Plot @@ -96,7 +96,7 @@ 5 wxEXPAND - 1 + 2 bLeftSizer @@ -661,8 +661,8 @@ 5 - wxEXPAND - 0 + + 1 bPlotOptionsSizer @@ -909,8 +909,8 @@ 5 wxEXPAND - 0 - + 1 + bSizerFmtPlot wxVERTICAL @@ -977,7 +977,7 @@ 5 wxEXPAND - 0 + 1 wxID_ANY HPGL Options: @@ -1339,7 +1339,7 @@ 5 wxEXPAND - 0 + 1 wxID_ANY PS Options: @@ -1410,7 +1410,7 @@ 5 wxEXPAND - 0 + 1 wxID_ANY Output Directory: @@ -1543,7 +1543,7 @@ 5 wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 + 1 bButtonsSizer diff --git a/pcbnew/dialogs/dialog_plot_base.h b/pcbnew/dialogs/dialog_plot_base.h index e7b5418e1e..82ae7216d3 100644 --- a/pcbnew/dialogs/dialog_plot_base.h +++ b/pcbnew/dialogs/dialog_plot_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Oct 18 2009) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -106,7 +106,7 @@ class DIALOG_PLOT_BASE : public wxDialog public: - DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 575,590 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PLOT_BASE(); }; diff --git a/pcbnew/plot_rtn.cpp b/pcbnew/plot_rtn.cpp index 34078be583..b476a97efc 100644 --- a/pcbnew/plot_rtn.cpp +++ b/pcbnew/plot_rtn.cpp @@ -746,6 +746,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer, default: Plot_Serigraphie( plotter, layer_mask, trace_mode ); + // Gerber: Subtract soldermask from silkscreen if enabled if( plotter->GetPlotterType() == PLOT_FORMAT_GERBER && g_pcb_plot_options.GetSubtractMaskFromSilk() ) @@ -758,6 +759,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer, { layer_mask = g_TabOneLayerMask[SOLDERMASK_N_BACK]; } + // Set layer polarity to negative plotter->SetLayerPolarity( false ); Plot_Standard_Layer( plotter, layer_mask,