Micro via input fields are enabled when design is loaded
Loading a design with micro vias enabled did check the box for enabling micro vias in pcbnew. The value input fields for diameter and drill size were not enabled. This patch moves the functionality into an new function and calls that from the onclick event of the checkbox and the init function of the dialog.
This commit is contained in:
parent
758445e33e
commit
9b900ea834
|
@ -291,6 +291,7 @@ void DIALOG_DESIGN_RULES::InitGlobalRules()
|
|||
|
||||
m_OptAllowBlindBuriedVias->SetValue( m_BrdSettings->m_BlindBuriedViaAllowed );
|
||||
m_OptAllowMicroVias->SetValue( m_BrdSettings->m_MicroViasAllowed );
|
||||
CheckAllowMicroVias();
|
||||
|
||||
PutValueInLocalUnits( *m_SetMicroViasMinSizeCtrl, m_BrdSettings->m_MicroViasMinSize );
|
||||
PutValueInLocalUnits( *m_SetMicroViasMinDrillCtrl, m_BrdSettings->m_MicroViasMinDrill );
|
||||
|
@ -808,15 +809,20 @@ void DIALOG_DESIGN_RULES::OnRemoveNetclassClick( wxCommandEvent& event )
|
|||
}
|
||||
}
|
||||
|
||||
void DIALOG_DESIGN_RULES::CheckAllowMicroVias()
|
||||
{
|
||||
bool enabled = m_OptAllowMicroVias->GetValue();
|
||||
m_SetMicroViasMinSizeCtrl->Enable( enabled );
|
||||
m_SetMicroViasMinDrillCtrl->Enable( enabled );
|
||||
}
|
||||
|
||||
/**
|
||||
* Function OnAllowMicroVias
|
||||
* is called whenever the AllowMicroVias checkbox is toggled
|
||||
*/
|
||||
void DIALOG_DESIGN_RULES::OnAllowMicroVias( wxCommandEvent& event )
|
||||
{
|
||||
bool enabled = m_OptAllowMicroVias->GetValue();
|
||||
m_SetMicroViasMinSizeCtrl->Enable( enabled );
|
||||
m_SetMicroViasMinDrillCtrl->Enable( enabled );
|
||||
CheckAllowMicroVias();
|
||||
}
|
||||
|
||||
void DIALOG_DESIGN_RULES::OnMoveUpSelectedNetClass( wxCommandEvent& event )
|
||||
|
|
|
@ -95,6 +95,7 @@ private:
|
|||
void OnNetClassesNameRightClick( wxGridEvent& event ) override { event.Skip(); }
|
||||
void OnAddNetclassClick( wxCommandEvent& event ) override;
|
||||
void OnRemoveNetclassClick( wxCommandEvent& event ) override;
|
||||
void CheckAllowMicroVias();
|
||||
void OnAllowMicroVias( wxCommandEvent& event ) override;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue