diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index 80f15feb25..cdb411db9e 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -111,12 +111,17 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aEditFrame, wxWindow* aParent, if( m_job ) { + SetTitle( _( "Plot Job Options" ) ); + PCB_PLOTTER::PlotJobToPlotOpts( m_plotOpts, m_job ); m_messagesPanel->Hide(); m_browseButton->Hide(); + m_openDirButton->Hide(); m_staticTextPlotFmt->Hide(); m_plotFormatOpt->Hide(); + m_buttonDRC->Hide(); + m_DRCExclusionsWarning->Hide(); m_sdbSizer1Apply->Hide(); } else @@ -125,6 +130,10 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aEditFrame, wxWindow* aParent, m_messagesPanel->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) ); } + // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and + // non-job versions (which have different sizes). + m_hash_key = TO_UTF8( GetTitle() ); + int order = 0; LSET plotOnAllLayersSelection = m_plotOpts.GetPlotOnAllLayersSelection(); wxArrayInt plotAllLayersOrder; @@ -533,7 +542,7 @@ void DIALOG_PLOT::reInitDialog() knownViolations++; } - if( knownViolations || exclusions ) + if( !m_job && ( knownViolations || exclusions ) ) { m_DRCExclusionsWarning->SetLabel( wxString::Format( m_DRCWarningTemplate, knownViolations, exclusions ) ); diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index 7aa95decc5..8e88538d4a 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 4.2.1-0-g80c4cb6) +// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -23,16 +23,13 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_staticTextPlotFmt = new wxStaticText( this, wxID_ANY, _("Plot format:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPlotFmt->Wrap( -1 ); - bupperSizer->Add( m_staticTextPlotFmt, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + bupperSizer->Add( m_staticTextPlotFmt, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); wxString m_plotFormatOptChoices[] = { _("Gerber"), _("Postscript"), _("SVG"), _("DXF"), _("HPGL"), _("PDF") }; int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString ); m_plotFormatOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 0 ); m_plotFormatOpt->SetSelection( 0 ); - bupperSizer->Add( m_plotFormatOpt, 0, wxALIGN_CENTER_VERTICAL|wxALL, 6 ); - - - bupperSizer->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); + bupperSizer->Add( m_plotFormatOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 28 ); m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextDir->Wrap( -1 ); @@ -44,12 +41,15 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bupperSizer->Add( m_outputDirectoryName, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); - bupperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + bupperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 5 ); m_openDirButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_openDirButton->SetToolTip( _("Open output directory") ); - bupperSizer->Add( m_openDirButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + bupperSizer->Add( m_openDirButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + + bupperSizer->Add( 0, 0, 0, wxEXPAND|wxRIGHT, 5 ); m_MainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -160,7 +160,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_SizerSolderMaskAlert = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapAlert = new wxStaticBitmap( this, wxID_ANY, wxArtProvider::GetBitmap( wxASCII_STR(wxART_WARNING), wxASCII_STR(wxART_CMN_DIALOG) ), wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapAlert = new wxStaticBitmap( this, wxID_ANY, wxArtProvider::GetBitmap( wxART_WARNING, wxART_CMN_DIALOG ), wxDefaultPosition, wxDefaultSize, 0 ); m_SizerSolderMaskAlert->Add( m_bitmapAlert, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); wxBoxSizer* bSizerWarningText; diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index 4e38e5f981..a93879652a 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -1,36 +1,34 @@ - + + ; C++ - ; - 1 - connect - none - - - 0 - 0 + 1 + source_name + 0 + 0 res UTF-8 + connect dialog_plot_base 1000 + none + + 1 - 1 - UI Dialog_Plot_base + . - 0 - source_name - 1 - 0 - source_name - - - 1 + 1 + 1 + 1 + 1 + UI + 0 + 0 0 - 0 0 wxAUI_MGR_DEFAULT @@ -76,7 +74,7 @@ none 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + wxALIGN_CENTER_VERTICAL|wxALL 0 1 @@ -137,8 +135,8 @@ - 6 - wxALIGN_CENTER_VERTICAL|wxALL + 28 + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -202,16 +200,6 @@ SetPlotFormat - - 10 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - 0 - protected - 0 - - 5 wxALL|wxALIGN_CENTER_VERTICAL @@ -341,7 +329,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + wxALIGN_CENTER_VERTICAL 0 1 @@ -416,7 +404,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT + wxALIGN_CENTER_VERTICAL|wxLEFT 0 1 @@ -489,6 +477,16 @@ onOpenOutputDirectory + + 5 + wxEXPAND|wxRIGHT + 0 + + 0 + protected + 0 + + diff --git a/pcbnew/dialogs/dialog_plot_base.h b/pcbnew/dialogs/dialog_plot_base.h index 3317c33804..4fa494972e 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 4.2.1-0-g80c4cb6) +// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE!