diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp
index 6deec2d169..40edd16173 100644
--- a/pcbnew/dialogs/dialog_plot.cpp
+++ b/pcbnew/dialogs/dialog_plot.cpp
@@ -52,6 +52,14 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) :
m_plotOpts = aParent->GetPlotSettings();
init_Dialog();
+ // We use a sdbSizer here to get the order right, which is platform-dependent
+ m_sdbSizer1OK->SetLabel( _( "Plot" ) );
+ m_sdbSizer1Apply->SetLabel( _( "Draft Plot" ) );
+ m_sdbSizer1Apply->SetToolTip( _( "Plot without running zone fill checks." ) );
+ m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
+
+ m_sdbSizer1OK->SetDefault();
+
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
}
@@ -753,7 +761,19 @@ void DIALOG_PLOT::OnGerberX2Checked( wxCommandEvent& event )
}
-void DIALOG_PLOT::Plot( wxCommandEvent& event )
+void DIALOG_PLOT::Plot( wxCommandEvent& )
+{
+ doPlot( true );
+}
+
+
+void DIALOG_PLOT::DraftPlot( wxCommandEvent& )
+{
+ doPlot( false );
+}
+
+
+void DIALOG_PLOT::doPlot( bool aCheckZones )
{
BOARD* board = m_parent->GetBoard();
@@ -782,6 +802,9 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
return;
}
+ if( aCheckZones )
+ m_parent->Check_All_Zones( this );
+
m_plotOpts.SetAutoScale( false );
m_plotOpts.SetScale( 1 );
diff --git a/pcbnew/dialogs/dialog_plot.h b/pcbnew/dialogs/dialog_plot.h
index 1dc9e2a5c1..30f3712b15 100644
--- a/pcbnew/dialogs/dialog_plot.h
+++ b/pcbnew/dialogs/dialog_plot.h
@@ -58,6 +58,7 @@ private:
// Event called functions
void Plot( wxCommandEvent& event ) override;
+ void DraftPlot( wxCommandEvent& event ) override;
void OnQuit( wxCommandEvent& event ) override;
void OnClose( wxCloseEvent& event ) override;
void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
@@ -74,6 +75,7 @@ private:
void init_Dialog(); // main initialization
void reInitDialog(); // initialization after calling drill dialog
void applyPlotSettings();
+ void doPlot( bool aCheckZones );
PlotFormat getPlotFormat();
void setPlotModeChoiceSelection( EDA_DRAW_MODE_T aPlotMode )
diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp
index 667808c74d..86595d2391 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 Apr 19 2018)
+// C++ code generated with wxFormBuilder (version Dec 30 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -378,23 +378,27 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizerButtons = new wxBoxSizer( wxHORIZONTAL );
m_buttonDRC = new wxButton( this, wxID_ANY, _("Run DRC..."), wxDefaultPosition, wxDefaultSize, 0 );
- bSizerButtons->Add( m_buttonDRC, 0, wxALL, 5 );
+ bSizerButtons->Add( m_buttonDRC, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_buttonDrill = new wxButton( this, ID_CREATE_DRILL_FILE, _("Generate Drill File..."), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButtons->Add( m_buttonDrill, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
bSizerButtons->Add( 10, 0, 1, wxEXPAND, 5 );
- m_plotButton = new wxButton( this, wxID_ANY, _("Plot"), wxDefaultPosition, wxDefaultSize, 0 );
- m_plotButton->SetDefault();
- bSizerButtons->Add( m_plotButton, 0, wxALL, 5 );
+ m_sdbSizer1 = new wxStdDialogButtonSizer();
+ m_sdbSizer1OK = new wxButton( this, wxID_OK );
+ m_sdbSizer1->AddButton( m_sdbSizer1OK );
+ m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
+ m_sdbSizer1->AddButton( m_sdbSizer1Apply );
+ m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
+ m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
+ m_sdbSizer1->Realize();
- m_buttonDrill = new wxButton( this, ID_CREATE_DRILL_FILE, _("Generate Drill File..."), wxDefaultPosition, wxDefaultSize, 0 );
- bSizerButtons->Add( m_buttonDrill, 0, wxALL, 5 );
-
- m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizerButtons->Add( m_buttonQuit, 0, wxALL, 5 );
+ bSizerButtons->Add( m_sdbSizer1, 0, wxEXPAND, 5 );
- m_MainSizer->Add( bSizerButtons, 0, wxALIGN_RIGHT|wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
+ m_MainSizer->Add( bSizerButtons, 0, wxALIGN_RIGHT|wxEXPAND|wxLEFT, 5 );
this->SetSizer( m_MainSizer );
@@ -437,9 +441,10 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_useGerberX2Attributes->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnGerberX2Checked ), NULL, this );
m_DXF_plotModeOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnChangeDXFPlotMode ), NULL, this );
m_buttonDRC->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::onRunDRC ), NULL, this );
- m_plotButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
m_buttonDrill->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
- m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
+ m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::DraftPlot ), NULL, this );
+ m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
+ m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
this->Connect( m_menuItem1->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnPopUpLayers ) );
this->Connect( m_menuItem2->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnPopUpLayers ) );
this->Connect( m_menuItem3->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnPopUpLayers ) );
@@ -460,9 +465,10 @@ DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE()
m_useGerberX2Attributes->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnGerberX2Checked ), NULL, this );
m_DXF_plotModeOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnChangeDXFPlotMode ), NULL, this );
m_buttonDRC->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::onRunDRC ), NULL, this );
- m_plotButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
m_buttonDrill->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
- m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
+ m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::DraftPlot ), NULL, this );
+ m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
+ m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
this->Disconnect( ID_LAYER_FAB, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnPopUpLayers ) );
this->Disconnect( ID_SELECT_COPPER_LAYERS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnPopUpLayers ) );
this->Disconnect( ID_DESELECT_COPPER_LAYERS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnPopUpLayers ) );
diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp
index 17375c9fe8..a11f35d742 100644
--- a/pcbnew/dialogs/dialog_plot_base.fbp
+++ b/pcbnew/dialogs/dialog_plot_base.fbp
@@ -14,7 +14,6 @@
dialog_plot_base
1000
none
-
1
Dialog_Plot_base
@@ -4391,7 +4390,7 @@