diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index ef5f6a57b5..df29526c50 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -97,12 +97,6 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME ) EVT_CHOICE( ID_ON_ZOOM_SELECT, GERBVIEW_FRAME::OnSelectZoom ) EVT_CHOICE( ID_ON_GRID_SELECT, GERBVIEW_FRAME::OnSelectGrid ) - // Right click context menu - EVT_MENU( ID_HIGHLIGHT_CMP_ITEMS, GERBVIEW_FRAME::Process_Special_Functions ) - EVT_MENU( ID_HIGHLIGHT_NET_ITEMS, GERBVIEW_FRAME::Process_Special_Functions ) - EVT_MENU( ID_HIGHLIGHT_APER_ATTRIBUTE_ITEMS, GERBVIEW_FRAME::Process_Special_Functions ) - EVT_MENU( ID_HIGHLIGHT_REMOVE_ALL, GERBVIEW_FRAME::Process_Special_Functions ) - EVT_UPDATE_UI( ID_ON_GRID_SELECT, GERBVIEW_FRAME::OnUpdateSelectGrid ) EVT_UPDATE_UI( ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE, GERBVIEW_FRAME::OnUpdateSelectDCode ) EVT_UPDATE_UI( ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER, @@ -117,12 +111,7 @@ END_EVENT_TABLE() */ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event ) { - int id = event.GetId(); - GERBVIEW_SELECTION_TOOL* selTool = GetToolManager()->GetTool(); - GERBVIEW_SELECTION& selection = selTool->GetSelection(); - GERBER_DRAW_ITEM* currItem = (GERBER_DRAW_ITEM*) selection.Front(); - - switch( id ) + switch( event.GetId() ) { case ID_GERBVIEW_ERASE_CURR_LAYER: Erase_Current_DrawLayer( true ); @@ -133,27 +122,6 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event ) Liste_D_Codes(); break; - case ID_HIGHLIGHT_CMP_ITEMS: - m_SelComponentBox->SetStringSelection( currItem->GetNetAttributes().m_Cmpref ); - break; - - case ID_HIGHLIGHT_NET_ITEMS: - m_SelNetnameBox->SetStringSelection( UnescapeString( currItem->GetNetAttributes().m_Netname ) ); - break; - - case ID_HIGHLIGHT_APER_ATTRIBUTE_ITEMS: - m_SelAperAttributesBox->SetStringSelection( currItem->GetDcodeDescr()->m_AperFunction ); - break; - - case ID_HIGHLIGHT_REMOVE_ALL: - m_SelComponentBox->SetSelection( 0 ); - m_SelNetnameBox->SetSelection( 0 ); - m_SelAperAttributesBox->SetSelection( 0 ); - - if( GetGbrImage( GetActiveLayer() ) ) - GetGbrImage( GetActiveLayer() )->m_Selected_Tool = 0; - break; - default: wxFAIL_MSG( wxT( "GERBVIEW_FRAME::Process_Special_Functions error" ) ); break; diff --git a/gerbview/gerbview_id.h b/gerbview/gerbview_id.h index 66fc30d9e8..53d64eda9f 100644 --- a/gerbview/gerbview_id.h +++ b/gerbview/gerbview_id.h @@ -55,13 +55,6 @@ enum gerbview_ids ID_TB_OPTIONS_SHOW_GBR_MODE_0, ID_TB_OPTIONS_SHOW_GBR_MODE_1, ID_TB_OPTIONS_SHOW_GBR_MODE_2, - ID_TB_MEASUREMENT_TOOL, - - // Right click context menu - ID_HIGHLIGHT_REMOVE_ALL, - ID_HIGHLIGHT_CMP_ITEMS, - ID_HIGHLIGHT_NET_ITEMS, - ID_HIGHLIGHT_APER_ATTRIBUTE_ITEMS, // IDs for drill file history (ID_FILEnn is already in use) ID_GERBVIEW_DRILL_FILE, diff --git a/gerbview/tools/gerbview_actions.cpp b/gerbview/tools/gerbview_actions.cpp index 5185c5ad3e..1a57a218ce 100644 --- a/gerbview/tools/gerbview_actions.cpp +++ b/gerbview/tools/gerbview_actions.cpp @@ -24,27 +24,6 @@ #include "gerbview_actions.h" -OPT GERBVIEW_ACTIONS::TranslateLegacyId( int aId ) -{ - switch( aId ) - { - case ID_HIGHLIGHT_REMOVE_ALL: - return GERBVIEW_ACTIONS::highlightClear.MakeEvent(); - - case ID_HIGHLIGHT_CMP_ITEMS: - return GERBVIEW_ACTIONS::highlightComponent.MakeEvent(); - - case ID_HIGHLIGHT_NET_ITEMS: - return GERBVIEW_ACTIONS::highlightNet.MakeEvent(); - - case ID_HIGHLIGHT_APER_ATTRIBUTE_ITEMS: - return GERBVIEW_ACTIONS::highlightAttribute.MakeEvent(); - } - - return OPT(); -} - - // Actions, being statically-defined, require specialized I18N handling. We continue to // use the _() macro so that string harvesting by the I18N framework doesn't have to be // specialized, but we don't translate on initialization and instead do it in the getters. diff --git a/gerbview/tools/gerbview_actions.h b/gerbview/tools/gerbview_actions.h index ac72ba0dac..f1bf42c6ee 100644 --- a/gerbview/tools/gerbview_actions.h +++ b/gerbview/tools/gerbview_actions.h @@ -84,7 +84,7 @@ public: static TOOL_ACTION highlightAttribute; ///> @copydoc COMMON_ACTIONS::TranslateLegacyId() - virtual OPT TranslateLegacyId( int aId ) override; + virtual OPT TranslateLegacyId( int aId ) override { return OPT(); } }; #endif // __GERBVIEW_ACTIONS_H