Custom width settings taken into account in wxUpdateUIEvent handlers.

This commit is contained in:
Maciej Suminski 2014-05-13 11:22:51 +02:00
parent 917e47397d
commit 7ec1313cbc
4 changed files with 17 additions and 4 deletions

View File

@ -248,6 +248,7 @@ public:
void OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent );
void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent );
void OnUpdateSelectAutoTrackWidth( wxUpdateUIEvent& aEvent );
void OnUpdateSelectCustomTrackWidth( wxUpdateUIEvent& aEvent );
void OnUpdateAutoPlaceModulesMode( wxUpdateUIEvent& aEvent );
void OnUpdateAutoPlaceTracksMode( wxUpdateUIEvent& aEvent );
void OnUpdateMuWaveToolbar( wxUpdateUIEvent& aEvent );

View File

@ -275,6 +275,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH,
PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth )
EVT_UPDATE_UI( ID_POPUP_PCB_SELECT_AUTO_WIDTH, PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth )
EVT_UPDATE_UI( ID_POPUP_PCB_SELECT_CUSTOM_WIDTH,
PCB_EDIT_FRAME::OnUpdateSelectCustomTrackWidth )
EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_VIA_SIZE, PCB_EDIT_FRAME::OnUpdateSelectViaSize )
EVT_UPDATE_UI( ID_TOOLBARH_PCB_MODE_MODULE, PCB_EDIT_FRAME::OnUpdateAutoPlaceModulesMode )
EVT_UPDATE_UI( ID_TOOLBARH_PCB_MODE_TRACKS, PCB_EDIT_FRAME::OnUpdateAutoPlaceTracksMode )

View File

@ -170,7 +170,7 @@ enum pcbnew_ids
ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH,
ID_POPUP_PCB_SELECT_WIDTH_START_RANGE,
ID_POPUP_PCB_SELECT_WIDTH,
ID_POPUP_PCB_SELECT_CUSTOM,
ID_POPUP_PCB_SELECT_CUSTOM_WIDTH,
ID_POPUP_PCB_SELECT_AUTO_WIDTH,
ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES,
ID_POPUP_PCB_SELECT_WIDTH1,

View File

@ -62,7 +62,9 @@ void PCB_EDIT_FRAME::OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent )
{
bool check = ( ( ( ID_POPUP_PCB_SELECT_WIDTH1 +
(int) GetBoard()->GetTrackWidthIndex() ) == aEvent.GetId() ) &&
!GetDesignSettings().m_UseConnectedTrackWidth );
!GetDesignSettings().m_UseConnectedTrackWidth &&
!GetBoard()->UseCustomTrackViaSize() );
aEvent.Check( check );
}
}
@ -70,7 +72,14 @@ void PCB_EDIT_FRAME::OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent )
void PCB_EDIT_FRAME::OnUpdateSelectAutoTrackWidth( wxUpdateUIEvent& aEvent )
{
aEvent.Check( GetDesignSettings().m_UseConnectedTrackWidth );
aEvent.Check( GetDesignSettings().m_UseConnectedTrackWidth &&
!GetBoard()->UseCustomTrackViaSize() );
}
void PCB_EDIT_FRAME::OnUpdateSelectCustomTrackWidth( wxUpdateUIEvent& aEvent )
{
aEvent.Check( GetBoard()->UseCustomTrackViaSize() );
}
@ -87,7 +96,8 @@ void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent )
{
bool check = ( ( ( ID_POPUP_PCB_SELECT_VIASIZE1 +
(int) GetBoard()->GetViaSizeIndex() ) == aEvent.GetId() ) &&
!GetDesignSettings().m_UseConnectedTrackWidth );
!GetDesignSettings().m_UseConnectedTrackWidth &&
!GetBoard()->UseCustomTrackViaSize() );
aEvent.Check( check );
}