Moved most of the board design rules related fields & methods to BOARD_DESIGN_SETTINGS class.

This commit is contained in:
Maciej Suminski
2014-05-13 11:22:51 +02:00
parent 7ec1313cbc
commit cd8aaee160
20 changed files with 393 additions and 391 deletions
+11 -11
View File
@@ -55,15 +55,15 @@ void PCB_EDIT_FRAME::OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent )
{
if( aEvent.GetId() == ID_AUX_TOOLBAR_PCB_TRACK_WIDTH )
{
if( m_SelTrackWidthBox->GetSelection() != (int) GetBoard()->GetTrackWidthIndex() )
m_SelTrackWidthBox->SetSelection( GetBoard()->GetTrackWidthIndex() );
if( m_SelTrackWidthBox->GetSelection() != (int) GetDesignSettings().GetTrackWidthIndex() )
m_SelTrackWidthBox->SetSelection( GetDesignSettings().GetTrackWidthIndex() );
}
else
{
bool check = ( ( ( ID_POPUP_PCB_SELECT_WIDTH1 +
(int) GetBoard()->GetTrackWidthIndex() ) == aEvent.GetId() ) &&
!GetDesignSettings().m_UseConnectedTrackWidth &&
!GetBoard()->UseCustomTrackViaSize() );
(int) GetDesignSettings().GetTrackWidthIndex() ) == aEvent.GetId() ) &&
!GetDesignSettings().m_UseConnectedTrackWidth &&
!GetDesignSettings().UseCustomTrackViaSize() );
aEvent.Check( check );
}
@@ -73,13 +73,13 @@ void PCB_EDIT_FRAME::OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent )
void PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth( wxUpdateUIEvent& aEvent )
{
aEvent.Check( GetDesignSettings().m_UseConnectedTrackWidth &&
!GetBoard()->UseCustomTrackViaSize() );
!GetDesignSettings().UseCustomTrackViaSize() );
}
void PCB_EDIT_FRAME::OnUpdateSelectCustomTrackWidth( wxUpdateUIEvent& aEvent )
{
aEvent.Check( GetBoard()->UseCustomTrackViaSize() );
aEvent.Check( GetDesignSettings().UseCustomTrackViaSize() );
}
@@ -89,15 +89,15 @@ void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent )
if( aEvent.GetId() == ID_AUX_TOOLBAR_PCB_VIA_SIZE )
{
if( m_SelViaSizeBox->GetSelection() != (int) GetBoard()->GetViaSizeIndex() )
m_SelViaSizeBox->SetSelection( GetBoard()->GetViaSizeIndex() );
if( m_SelViaSizeBox->GetSelection() != (int) GetDesignSettings().GetViaSizeIndex() )
m_SelViaSizeBox->SetSelection( GetDesignSettings().GetViaSizeIndex() );
}
else
{
bool check = ( ( ( ID_POPUP_PCB_SELECT_VIASIZE1 +
(int) GetBoard()->GetViaSizeIndex() ) == aEvent.GetId() ) &&
(int) GetDesignSettings().GetViaSizeIndex() ) == aEvent.GetId() ) &&
!GetDesignSettings().m_UseConnectedTrackWidth &&
!GetBoard()->UseCustomTrackViaSize() );
!GetDesignSettings().UseCustomTrackViaSize() );
aEvent.Check( check );
}