diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp index 62d21f5aef..d8e0fc7a45 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp @@ -117,8 +117,8 @@ DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( PCB_EDIT buildFilterLists(); - m_parent->UpdateTrackWidthSelectBox( m_trackWidthSelectBox ); - m_parent->UpdateViaSizeSelectBox( m_viaSizesSelectBox ); + m_parent->UpdateTrackWidthSelectBox( m_trackWidthSelectBox, false ); + m_parent->UpdateViaSizeSelectBox( m_viaSizesSelectBox, false ); m_layerBox->SetBoardFrame( m_parent ); m_layerBox->SetLayersHotkeys( false ); diff --git a/pcbnew/pcb_edit_frame.h b/pcbnew/pcb_edit_frame.h index 7f66c1a83a..71411bcbfc 100644 --- a/pcbnew/pcb_edit_frame.h +++ b/pcbnew/pcb_edit_frame.h @@ -353,8 +353,8 @@ public: void OnUpdatePCBFromSch( wxCommandEvent& event ); void OnRunEeschema( wxCommandEvent& event ); - void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox ); - void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox ); + void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, const bool aEdit = true ); + void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, const bool aEdit = true ); void GetKicadAbout( wxCommandEvent& event ); diff --git a/pcbnew/tool_pcb_editor.cpp b/pcbnew/tool_pcb_editor.cpp index 40bd48072a..5428b8276d 100644 --- a/pcbnew/tool_pcb_editor.cpp +++ b/pcbnew/tool_pcb_editor.cpp @@ -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 ) return; @@ -687,8 +687,11 @@ void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox ) aTrackWidthSelectBox->Append( msg ); } - aTrackWidthSelectBox->Append( wxT( "---" ) ); - aTrackWidthSelectBox->Append( _( "Edit pre-defined sizes..." ) ); + if( aEdit ) + { + aTrackWidthSelectBox->Append( wxT( "---" ) ); + aTrackWidthSelectBox->Append( _( "Edit pre-defined sizes..." ) ); + } if( GetDesignSettings().GetTrackWidthIndex() >= GetDesignSettings().m_TrackWidthList.size() ) 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 ) return; @@ -736,8 +739,11 @@ void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox ) aViaSizeSelectBox->Append( msg ); } - aViaSizeSelectBox->Append( wxT( "---" ) ); - aViaSizeSelectBox->Append( _( "Edit pre-defined sizes..." ) ); + if( aEdit ) + { + aViaSizeSelectBox->Append( wxT( "---" ) ); + aViaSizeSelectBox->Append( _( "Edit pre-defined sizes..." ) ); + } if( GetDesignSettings().GetViaSizeIndex() >= GetDesignSettings().m_ViasDimensionsList.size() ) GetDesignSettings().SetViaSizeIndex( 0 );