From 9485a4d381e26048b77d7876d48a70856d749eb3 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 10 Aug 2017 14:25:31 +0200 Subject: [PATCH] Pcbnew, dialog export STEP: fox not working export in countries using the comma as floating point separator. Add origin at board center and serious cleaning code. --- pcbnew/dialogs/dialog_export_step.cpp | 261 ++++++++++++--------- pcbnew/dialogs/dialog_export_step_base.cpp | 60 ++++- pcbnew/dialogs/dialog_export_step_base.fbp | 114 ++++++++- pcbnew/dialogs/dialog_export_step_base.h | 11 +- 4 files changed, 308 insertions(+), 138 deletions(-) diff --git a/pcbnew/dialogs/dialog_export_step.cpp b/pcbnew/dialogs/dialog_export_step.cpp index e0fa6f0a26..ae4cf54b05 100644 --- a/pcbnew/dialogs/dialog_export_step.cpp +++ b/pcbnew/dialogs/dialog_export_step.cpp @@ -37,9 +37,7 @@ #include "class_board.h" #include "dialog_export_step_base.h" -#define OPTKEY_STEP_USE_DRILL_ORG "STEP_UseDrillOrigin" -#define OPTKEY_STEP_USE_AUX_ORG "STEP_UseAuxOrigin" -#define OPTKEY_STEP_USE_USER_ORG "STEP_UseUserOrigin" +#define OPTKEY_STEP_ORIGIN_OPT "STEP_Origin_Opt" #define OPTKEY_STEP_UORG_UNITS "STEP_UserOriginUnits" #define OPTKEY_STEP_UORG_X "STEP_UserOriginX" #define OPTKEY_STEP_UORG_Y "STEP_UserOriginY" @@ -48,72 +46,34 @@ class DIALOG_EXPORT_STEP: public DIALOG_EXPORT_STEP_BASE { +public: + enum STEP_ORG_OPT + { + STEP_ORG_0, // absolute coordinates + STEP_ORG_PLOT_AXIS, // origin is plot/drill axis origin + STEP_ORG_GRID_AXIS, // origin is grid origin + STEP_ORG_BOARD_CENTER, // origin is board center + STEP_ORG_USER, // origin is entered by user + }; + private: PCB_EDIT_FRAME* m_parent; wxConfigBase* m_config; - bool m_useDrillOrg; // remember last preference for Use Drill Origin - bool m_useAuxOrg; // remember last preference for Use Aux Origin - bool m_useUserOrg; // remember last preference for Use User Origin + // The last preference for STEP Origin: + STEP_ORG_OPT m_STEP_org_opt; bool m_noVirtual; // remember last preference for No Virtual Component int m_OrgUnits; // remember last units for User Origin double m_XOrg; // remember last User Origin X value double m_YOrg; // remember last User Origin Y value public: - DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* parent ) : - DIALOG_EXPORT_STEP_BASE( parent ) - { - m_parent = parent; - m_config = Kiface().KifaceSettings(); - SetFocus(); - m_useDrillOrg = false; - m_config->Read( OPTKEY_STEP_USE_DRILL_ORG, &m_useDrillOrg ); - m_cbDrillOrigin->SetValue( m_useDrillOrg ); - m_useAuxOrg = false; - m_config->Read( OPTKEY_STEP_USE_AUX_ORG, &m_useAuxOrg ); - m_cbAuxOrigin->SetValue( m_useAuxOrg ); - m_useUserOrg = false; - m_config->Read( OPTKEY_STEP_USE_USER_ORG, &m_useUserOrg ); - m_cbUserOrigin->SetValue( m_useUserOrg ); - m_cbUserOrigin->Bind( wxEVT_CHECKBOX, &DIALOG_EXPORT_STEP::OnUserOriginSelect, this ); - m_config->Read( OPTKEY_STEP_UORG_UNITS, &m_OrgUnits, 0 ); - m_config->Read( OPTKEY_STEP_UORG_X, &m_XOrg, 0.0 ); - m_config->Read( OPTKEY_STEP_UORG_Y, &m_YOrg, 0.0 ); - m_config->Read( OPTKEY_STEP_NOVIRT, &m_noVirtual ); - m_cbRemoveVirtual->SetValue( m_noVirtual ); - - m_STEP_OrgUnitChoice->SetSelection( m_OrgUnits ); - wxString tmpStr; - tmpStr << m_XOrg; - m_STEP_Xorg->SetValue( tmpStr ); - tmpStr = ""; - tmpStr << m_YOrg; - m_STEP_Yorg->SetValue( tmpStr ); - - if( m_useUserOrg ) - { - m_STEP_OrgUnitChoice->Enable( true ); - m_STEP_Xorg->Enable( true ); - m_STEP_Yorg->Enable( true ); - } - else - { - m_STEP_OrgUnitChoice->Enable( false ); - m_STEP_Xorg->Enable( false ); - m_STEP_Yorg->Enable( false ); - } - - m_sdbSizerOK->SetDefault(); - - // Now all widgets have the size fixed, call FinishDialogSettings - FinishDialogSettings(); - } + DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* parent ); ~DIALOG_EXPORT_STEP() { - m_config->Write( OPTKEY_STEP_USE_DRILL_ORG, m_cbDrillOrigin->GetValue() ); - m_config->Write( OPTKEY_STEP_USE_AUX_ORG, m_cbAuxOrigin->GetValue() ); - m_config->Write( OPTKEY_STEP_USE_USER_ORG, m_cbUserOrigin->GetValue() ); + GetOriginOption(); // Update m_STEP_org_opt member. + m_config->Write( OPTKEY_STEP_ORIGIN_OPT, (int)m_STEP_org_opt ); + m_config->Write( OPTKEY_STEP_NOVIRT, m_cbRemoveVirtual->GetValue() ); m_config->Write( OPTKEY_STEP_UORG_UNITS, m_STEP_OrgUnitChoice->GetSelection() ); @@ -141,46 +101,62 @@ public: return DoubleValueFromString( UNSCALED_UNITS, m_STEP_Yorg->GetValue() ); } - bool GetDrillOrgOption() - { - return m_cbDrillOrigin->GetValue(); - } - - bool GetAuxOrgOption() - { - return m_cbAuxOrigin->GetValue(); - } - - bool GetUserOrgOption() - { - return m_cbUserOrigin->GetValue(); - } + STEP_ORG_OPT GetOriginOption(); bool GetNoVirtOption() { return m_cbRemoveVirtual->GetValue(); } - void OnUserOriginSelect( wxCommandEvent& event ) - { - if( GetUserOrgOption() ) - { - m_STEP_OrgUnitChoice->Enable( true ); - m_STEP_Xorg->Enable( true ); - m_STEP_Yorg->Enable( true ); - } - else - { - m_STEP_OrgUnitChoice->Enable( false ); - m_STEP_Xorg->Enable( false ); - m_STEP_Yorg->Enable( false ); - } + bool TransferDataFromWindow() override; + void onSelectOrigin( wxCommandEvent& event ) override; +}; - event.Skip(); +DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* parent ) : + DIALOG_EXPORT_STEP_BASE( parent ) +{ + m_parent = parent; + m_config = Kiface().KifaceSettings(); + SetFocus(); + + m_STEP_org_opt = STEP_ORG_0;; + int tmp = STEP_ORG_0; + + if( m_config->Read( OPTKEY_STEP_ORIGIN_OPT, &tmp ) ) + m_STEP_org_opt = (STEP_ORG_OPT) tmp; + + switch( m_STEP_org_opt ) + { + default: break; + case STEP_ORG_PLOT_AXIS: m_cbPlotOrigin->SetValue( true ); break; + case STEP_ORG_GRID_AXIS: m_cbGridOrigin->SetValue( true ); break; + case STEP_ORG_USER: m_cbUserOrigin->SetValue( true ); break; + case STEP_ORG_BOARD_CENTER: m_cbBoardCenter->SetValue( true ); break; } - bool TransferDataFromWindow() override; -}; + m_config->Read( OPTKEY_STEP_UORG_UNITS, &m_OrgUnits, 0 ); + m_config->Read( OPTKEY_STEP_UORG_X, &m_XOrg, 0.0 ); + m_config->Read( OPTKEY_STEP_UORG_Y, &m_YOrg, 0.0 ); + m_config->Read( OPTKEY_STEP_NOVIRT, &m_noVirtual ); + m_cbRemoveVirtual->SetValue( m_noVirtual ); + + m_STEP_OrgUnitChoice->SetSelection( m_OrgUnits ); + wxString tmpStr; + tmpStr << m_XOrg; + m_STEP_Xorg->SetValue( tmpStr ); + tmpStr = ""; + tmpStr << m_YOrg; + m_STEP_Yorg->SetValue( tmpStr ); + + m_STEP_OrgUnitChoice->Enable( m_cbUserOrigin->IsChecked() ); + m_STEP_Xorg->Enable( m_cbUserOrigin->IsChecked() ); + m_STEP_Yorg->Enable( m_cbUserOrigin->IsChecked() ); + + m_sdbSizerOK->SetDefault(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); +} bool DIALOG_EXPORT_STEP::TransferDataFromWindow() @@ -205,6 +181,47 @@ bool DIALOG_EXPORT_STEP::TransferDataFromWindow() } +void DIALOG_EXPORT_STEP::onSelectOrigin( wxCommandEvent& event ) +{ + // If a new checkbox was checked: ensure other options are disabled + wxCheckBox* cbList[] + { + m_cbPlotOrigin, m_cbGridOrigin, m_cbUserOrigin, m_cbBoardCenter, NULL + }; + + if( event.IsChecked() ) + { + for( int ii = 0; cbList[ii]; ii++ ) + { + if( cbList[ii] != event.GetEventObject() ) + cbList[ii]->SetValue( false ); + } + } + + // Enable/disable the user origin widgets: + m_STEP_OrgUnitChoice->Enable( m_cbUserOrigin->IsChecked() ); + m_STEP_Xorg->Enable( m_cbUserOrigin->IsChecked() ); + m_STEP_Yorg->Enable( m_cbUserOrigin->IsChecked() ); +} + + +DIALOG_EXPORT_STEP::STEP_ORG_OPT DIALOG_EXPORT_STEP::GetOriginOption() +{ + m_STEP_org_opt = STEP_ORG_0; + + if( m_cbPlotOrigin->IsChecked() ) + m_STEP_org_opt = STEP_ORG_PLOT_AXIS; + else if( m_cbGridOrigin->IsChecked() ) + m_STEP_org_opt = STEP_ORG_GRID_AXIS; + else if( m_cbUserOrigin->IsChecked() ) + m_STEP_org_opt = STEP_ORG_USER; + else if( m_cbBoardCenter->IsChecked() ) + m_STEP_org_opt = STEP_ORG_BOARD_CENTER; + + return m_STEP_org_opt; +} + + void PCB_EDIT_FRAME::OnExportSTEP( wxCommandEvent& event ) { @@ -242,29 +259,13 @@ void PCB_EDIT_FRAME::OnExportSTEP( wxCommandEvent& event ) return; wxString outputFile = dlg.FilePicker()->GetPath(); - brdFile.SetExt( brdExt ); outputFile.Prepend( "\"" ); outputFile.Append( "\"" ); - bool aUseDrillOrg = dlg.GetDrillOrgOption(); - bool aUseAuxOrg = dlg.GetAuxOrgOption(); - bool aUseUserOrg = dlg.GetUserOrgOption(); - bool aNoVirtual = dlg.GetNoVirtOption(); - double aXOrg = 0.0; - double aYOrg = 0.0; - if( aUseUserOrg ) - { - aXOrg = dlg.GetXOrg(); - aYOrg = dlg.GetYOrg(); - - if( dlg.GetOrgUnitsChoice() == 1 ) - { - // selected reference unit is in inches - aXOrg *= 25.4; - aYOrg *= 25.4; - } - } + DIALOG_EXPORT_STEP::STEP_ORG_OPT orgOpt = dlg.GetOriginOption(); + double xOrg = 0.0; + double yOrg = 0.0; wxFileName appK2S( wxStandardPaths::Get().GetExecutablePath() ); appK2S.SetName( "kicad2step" ); @@ -273,17 +274,49 @@ void PCB_EDIT_FRAME::OnExportSTEP( wxCommandEvent& event ) cmdK2S.Append( appK2S.GetFullPath() ); cmdK2S.Append( "\"" ); - if( aNoVirtual ) + if( dlg.GetNoVirtOption() ) cmdK2S.Append( " --no-virtual" ); - if( aUseDrillOrg ) - cmdK2S.Append( " --drill-origin" ); + switch( orgOpt ) + { + case DIALOG_EXPORT_STEP::STEP_ORG_0: + break; - if( aUseAuxOrg ) - cmdK2S.Append( " --grid-origin" ); + case DIALOG_EXPORT_STEP::STEP_ORG_PLOT_AXIS: + cmdK2S.Append( " --drill-origin" ); + break; - if( aUseUserOrg ) - cmdK2S.Append( wxString::Format( " --user-origin %.6fx%.6f", aXOrg, aYOrg ) ); + case DIALOG_EXPORT_STEP::STEP_ORG_GRID_AXIS: + cmdK2S.Append( " --grid-origin" ); + break; + + case DIALOG_EXPORT_STEP::STEP_ORG_USER: + { + xOrg = dlg.GetXOrg(); + yOrg = dlg.GetYOrg(); + + if( dlg.GetOrgUnitsChoice() == 1 ) + { + // selected reference unit is in inches, and STEP units are mm + xOrg *= 25.4; + yOrg *= 25.4; + } + + LOCALE_IO dummy; + cmdK2S.Append( wxString::Format( " --user-origin %.6fx%.6f", xOrg, yOrg ) ); + } + break; + + case DIALOG_EXPORT_STEP::STEP_ORG_BOARD_CENTER: + { + EDA_RECT bbox = GetBoard()->ComputeBoundingBox( true ); + xOrg = Iu2Millimeter( bbox.GetCenter().x ); + yOrg = Iu2Millimeter( bbox.GetCenter().y ); + LOCALE_IO dummy; + cmdK2S.Append( wxString::Format( " --user-origin %.6fx%.6f", xOrg, yOrg ) ); + } + break; + } cmdK2S.Append( " -f -o " ); cmdK2S.Append( outputFile ); diff --git a/pcbnew/dialogs/dialog_export_step_base.cpp b/pcbnew/dialogs/dialog_export_step_base.cpp index a4a9db454c..fcd12b5503 100644 --- a/pcbnew/dialogs/dialog_export_step_base.cpp +++ b/pcbnew/dialogs/dialog_export_step_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 5 2014) +// C++ code generated with wxFormBuilder (version Jul 2 2017) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -34,7 +34,7 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i m_staticText6 = new wxStaticText( this, wxID_ANY, _("Coordinate origin options:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText6->Wrap( -1 ); - m_staticText6->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + m_staticText6->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); bSizer7->Add( m_staticText6, 0, wxALL, 5 ); @@ -46,18 +46,18 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i fgSizer2->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_cbDrillOrigin = new wxCheckBox( this, wxID_ANY, _("Drill and plot axis origin"), wxDefaultPosition, wxDefaultSize, 0 ); - m_cbDrillOrigin->SetToolTip( _("Use the auxiliary axis origin (used in plot and drill geneation) as STEP coordinates origin.") ); + m_cbPlotOrigin = new wxCheckBox( this, wxID_ANY, _("Drill and plot axis origin"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbPlotOrigin->SetToolTip( _("Use the auxiliary axis origin (used in plot and drill geneation) as STEP coordinates origin.") ); - fgSizer2->Add( m_cbDrillOrigin, 0, wxALL, 5 ); + fgSizer2->Add( m_cbPlotOrigin, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); - m_cbAuxOrigin = new wxCheckBox( this, wxID_ANY, _("Grid origin"), wxDefaultPosition, wxDefaultSize, 0 ); - m_cbAuxOrigin->SetToolTip( _("Use the grid origin as STEP coordinates origin.") ); + m_cbGridOrigin = new wxCheckBox( this, wxID_ANY, _("Grid origin"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbGridOrigin->SetToolTip( _("Use the grid origin as STEP coordinates origin.") ); - fgSizer2->Add( m_cbAuxOrigin, 0, wxALL, 5 ); + fgSizer2->Add( m_cbGridOrigin, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); @@ -65,7 +65,15 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i m_cbUserOrigin = new wxCheckBox( this, wxID_ANY, _("User defined origin"), wxDefaultPosition, wxDefaultSize, 0 ); m_cbUserOrigin->SetToolTip( _("Use this option if you want to define a specific coordinate origin value.") ); - fgSizer2->Add( m_cbUserOrigin, 0, wxALL, 5 ); + fgSizer2->Add( m_cbUserOrigin, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + + fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_cbBoardCenter = new wxCheckBox( this, wxID_ANY, _("Board center origin"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbBoardCenter->SetToolTip( _("Use this option if you want to define coordinate origin at board center.") ); + + fgSizer2->Add( m_cbBoardCenter, 0, wxALL, 5 ); bSizer7->Add( fgSizer2, 1, wxEXPAND, 5 ); @@ -78,7 +86,7 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i m_staticText2 = new wxStaticText( this, wxID_ANY, _("User defined origin:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText2->Wrap( -1 ); - m_staticText2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + m_staticText2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); bSizer3->Add( m_staticText2, 0, wxALL, 5 ); @@ -108,7 +116,14 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i fgSizer1->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); m_STEP_Xorg = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); - m_STEP_Xorg->SetMaxLength( 8 ); + #ifdef __WXGTK__ + if ( !m_STEP_Xorg->HasFlag( wxTE_MULTILINE ) ) + { + m_STEP_Xorg->SetMaxLength( 8 ); + } + #else + m_STEP_Xorg->SetMaxLength( 8 ); + #endif fgSizer1->Add( m_STEP_Xorg, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); @@ -119,7 +134,14 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i fgSizer1->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); m_STEP_Yorg = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); - m_STEP_Yorg->SetMaxLength( 8 ); + #ifdef __WXGTK__ + if ( !m_STEP_Yorg->HasFlag( wxTE_MULTILINE ) ) + { + m_STEP_Yorg->SetMaxLength( 8 ); + } + #else + m_STEP_Yorg->SetMaxLength( 8 ); + #endif fgSizer1->Add( m_STEP_Yorg, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); @@ -133,7 +155,7 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i m_staticText7 = new wxStaticText( this, wxID_ANY, _("Other options:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText7->Wrap( -1 ); - m_staticText7->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + m_staticText7->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); bSizer8->Add( m_staticText7, 0, wxALL, 5 ); @@ -175,8 +197,20 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i bSizerSTEPFile->Fit( this ); this->Centre( wxBOTH ); + + // Connect Events + m_cbPlotOrigin->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this ); + m_cbGridOrigin->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this ); + m_cbUserOrigin->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this ); + m_cbBoardCenter->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this ); } DIALOG_EXPORT_STEP_BASE::~DIALOG_EXPORT_STEP_BASE() { + // Disconnect Events + m_cbPlotOrigin->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this ); + m_cbGridOrigin->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this ); + m_cbUserOrigin->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this ); + m_cbBoardCenter->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this ); + } diff --git a/pcbnew/dialogs/dialog_export_step_base.fbp b/pcbnew/dialogs/dialog_export_step_base.fbp index 580711e10e..7402228e11 100644 --- a/pcbnew/dialogs/dialog_export_step_base.fbp +++ b/pcbnew/dialogs/dialog_export_step_base.fbp @@ -475,7 +475,7 @@ 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 1 @@ -514,7 +514,7 @@ 0 1 - m_cbDrillOrigin + m_cbPlotOrigin 1 @@ -536,7 +536,7 @@ - + onSelectOrigin @@ -573,7 +573,7 @@ 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 1 @@ -612,7 +612,7 @@ 0 1 - m_cbAuxOrigin + m_cbGridOrigin 1 @@ -634,7 +634,7 @@ - + onSelectOrigin @@ -671,7 +671,7 @@ 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 1 @@ -732,7 +732,105 @@ - + onSelectOrigin + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Board center origin + + 0 + + + 0 + + 1 + m_cbBoardCenter + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Use this option if you want to define coordinate origin at board center. + + wxFILTER_NONE + wxDefaultValidator + + + + + + onSelectOrigin diff --git a/pcbnew/dialogs/dialog_export_step_base.h b/pcbnew/dialogs/dialog_export_step_base.h index 2ec3dc8338..2416ae5fb7 100644 --- a/pcbnew/dialogs/dialog_export_step_base.h +++ b/pcbnew/dialogs/dialog_export_step_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 5 2014) +// C++ code generated with wxFormBuilder (version Jul 2 2017) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -44,9 +44,10 @@ class DIALOG_EXPORT_STEP_BASE : public DIALOG_SHIM wxFilePickerCtrl* m_filePickerSTEP; wxStaticLine* m_staticline2; wxStaticText* m_staticText6; - wxCheckBox* m_cbDrillOrigin; - wxCheckBox* m_cbAuxOrigin; + wxCheckBox* m_cbPlotOrigin; + wxCheckBox* m_cbGridOrigin; wxCheckBox* m_cbUserOrigin; + wxCheckBox* m_cbBoardCenter; wxStaticText* m_staticText2; wxStaticText* m_staticText5; wxChoice* m_STEP_OrgUnitChoice; @@ -60,6 +61,10 @@ class DIALOG_EXPORT_STEP_BASE : public DIALOG_SHIM wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; + + // Virtual event handlers, overide them in your derived class + virtual void onSelectOrigin( wxCommandEvent& event ) { event.Skip(); } + public: