Pcbnew, plot dialog: grey out advanced net attributes if Gerber X2 is unchecked.
m_useGerberNetAttributes is useless if m_useGerberX2Attributes is not checked. So disabled (greyed out) when Gerber X2 gets unchecked to make it clear to the user.
This commit is contained in:
parent
50a388fe56
commit
50cdd5cdf1
|
@ -166,6 +166,9 @@ void DIALOG_PLOT::Init_Dialog()
|
|||
// Option for including Gerber netlist info (from Gerber X2 format) in the output
|
||||
#ifdef KICAD_USE_GBR_NETATTRIBUTES
|
||||
m_useGerberNetAttributes->SetValue( m_plotOpts.GetIncludeGerberNetlistInfo() );
|
||||
|
||||
// Grey out if m_useGerberX2Attributes is not checked
|
||||
m_useGerberNetAttributes->Enable( m_useGerberX2Attributes->GetValue() );
|
||||
#else
|
||||
m_plotOpts.SetIncludeGerberNetlistInfo( false );
|
||||
m_useGerberNetAttributes->SetValue( false );
|
||||
|
@ -670,6 +673,23 @@ void DIALOG_PLOT::applyPlotSettings()
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_PLOT::OnGerberX2Checked( wxCommandEvent& event )
|
||||
{
|
||||
// m_useGerberNetAttributes is useless if m_useGerberX2Attributes
|
||||
// is not checked. So disabled (greyed out) when Gerber X2 gets unchecked
|
||||
// to make it clear to the user.
|
||||
if( m_useGerberX2Attributes->GetValue() )
|
||||
{
|
||||
m_useGerberNetAttributes->Enable( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_useGerberNetAttributes->Enable( false );
|
||||
m_useGerberNetAttributes->SetValue( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_PLOT::Plot( wxCommandEvent& event )
|
||||
{
|
||||
applyPlotSettings();
|
||||
|
|
|
@ -68,9 +68,10 @@ private:
|
|||
void SetPlotFormat( wxCommandEvent& event ) override;
|
||||
void OnSetScaleOpt( wxCommandEvent& event ) override;
|
||||
void CreateDrillFile( wxCommandEvent& event ) override;
|
||||
void OnGerberX2Checked( wxCommandEvent& event ) override;
|
||||
virtual void onRunDRC( wxCommandEvent& event ) override;
|
||||
|
||||
// orther functions
|
||||
// other functions
|
||||
void applyPlotSettings();
|
||||
PlotFormat getPlotFormat();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version May 6 2016)
|
||||
// C++ code generated with wxFormBuilder (version Feb 16 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -410,6 +410,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
|
|||
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
|
||||
m_layerCheckListBox->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ), NULL, this );
|
||||
m_scaleOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this );
|
||||
m_useGerberX2Attributes->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnGerberX2Checked ), 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_buttonDRC->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::onRunDRC ), NULL, this );
|
||||
|
@ -431,6 +432,7 @@ DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE()
|
|||
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
|
||||
m_layerCheckListBox->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ), NULL, this );
|
||||
m_scaleOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this );
|
||||
m_useGerberX2Attributes->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnGerberX2Checked ), 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_buttonDRC->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::onRunDRC ), NULL, this );
|
||||
|
|
|
@ -2845,7 +2845,7 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnCheckBox">OnGerberX2Checked</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version May 6 2016)
|
||||
// C++ code generated with wxFormBuilder (version Feb 16 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -121,6 +121,7 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
|
|||
virtual void SetPlotFormat( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSetScaleOpt( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnGerberX2Checked( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void Plot( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void CreateDrillFile( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onRunDRC( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
|
Loading…
Reference in New Issue