pcbnew: Prevent using "edit width" in dialogs
Editing predefined tracks/nets/vias sizes makes sense in the toolbar but not inside the submenu.
This commit is contained in:
parent
edc73de023
commit
e1bce7dccd
|
@ -117,8 +117,8 @@ DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( PCB_EDIT
|
||||||
|
|
||||||
buildFilterLists();
|
buildFilterLists();
|
||||||
|
|
||||||
m_parent->UpdateTrackWidthSelectBox( m_trackWidthSelectBox );
|
m_parent->UpdateTrackWidthSelectBox( m_trackWidthSelectBox, false );
|
||||||
m_parent->UpdateViaSizeSelectBox( m_viaSizesSelectBox );
|
m_parent->UpdateViaSizeSelectBox( m_viaSizesSelectBox, false );
|
||||||
|
|
||||||
m_layerBox->SetBoardFrame( m_parent );
|
m_layerBox->SetBoardFrame( m_parent );
|
||||||
m_layerBox->SetLayersHotkeys( false );
|
m_layerBox->SetLayersHotkeys( false );
|
||||||
|
|
|
@ -353,8 +353,8 @@ public:
|
||||||
void OnUpdatePCBFromSch( wxCommandEvent& event );
|
void OnUpdatePCBFromSch( wxCommandEvent& event );
|
||||||
void OnRunEeschema( wxCommandEvent& event );
|
void OnRunEeschema( wxCommandEvent& event );
|
||||||
|
|
||||||
void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox );
|
void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, const bool aEdit = true );
|
||||||
void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox );
|
void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, const bool aEdit = true );
|
||||||
|
|
||||||
void GetKicadAbout( wxCommandEvent& event );
|
void GetKicadAbout( wxCommandEvent& event );
|
||||||
|
|
||||||
|
|
|
@ -656,7 +656,7 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox )
|
void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, const bool aEdit )
|
||||||
{
|
{
|
||||||
if( aTrackWidthSelectBox == NULL )
|
if( aTrackWidthSelectBox == NULL )
|
||||||
return;
|
return;
|
||||||
|
@ -687,8 +687,11 @@ void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox )
|
||||||
aTrackWidthSelectBox->Append( msg );
|
aTrackWidthSelectBox->Append( msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
aTrackWidthSelectBox->Append( wxT( "---" ) );
|
if( aEdit )
|
||||||
aTrackWidthSelectBox->Append( _( "Edit pre-defined sizes..." ) );
|
{
|
||||||
|
aTrackWidthSelectBox->Append( wxT( "---" ) );
|
||||||
|
aTrackWidthSelectBox->Append( _( "Edit pre-defined sizes..." ) );
|
||||||
|
}
|
||||||
|
|
||||||
if( GetDesignSettings().GetTrackWidthIndex() >= GetDesignSettings().m_TrackWidthList.size() )
|
if( GetDesignSettings().GetTrackWidthIndex() >= GetDesignSettings().m_TrackWidthList.size() )
|
||||||
GetDesignSettings().SetTrackWidthIndex( 0 );
|
GetDesignSettings().SetTrackWidthIndex( 0 );
|
||||||
|
@ -697,7 +700,7 @@ void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox )
|
void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, const bool aEdit )
|
||||||
{
|
{
|
||||||
if( aViaSizeSelectBox == NULL )
|
if( aViaSizeSelectBox == NULL )
|
||||||
return;
|
return;
|
||||||
|
@ -736,8 +739,11 @@ void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox )
|
||||||
aViaSizeSelectBox->Append( msg );
|
aViaSizeSelectBox->Append( msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
aViaSizeSelectBox->Append( wxT( "---" ) );
|
if( aEdit )
|
||||||
aViaSizeSelectBox->Append( _( "Edit pre-defined sizes..." ) );
|
{
|
||||||
|
aViaSizeSelectBox->Append( wxT( "---" ) );
|
||||||
|
aViaSizeSelectBox->Append( _( "Edit pre-defined sizes..." ) );
|
||||||
|
}
|
||||||
|
|
||||||
if( GetDesignSettings().GetViaSizeIndex() >= GetDesignSettings().m_ViasDimensionsList.size() )
|
if( GetDesignSettings().GetViaSizeIndex() >= GetDesignSettings().m_ViasDimensionsList.size() )
|
||||||
GetDesignSettings().SetViaSizeIndex( 0 );
|
GetDesignSettings().SetViaSizeIndex( 0 );
|
||||||
|
|
Loading…
Reference in New Issue