Remove unused GerbView IDs for items that were already actions
All these IDs were for commands that have already been transitioned to actions and there was no wxCommandEvent interface for them.
This commit is contained in:
parent
61cdf3436b
commit
d01e22232a
|
@ -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_TOOL>();
|
||||
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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -24,27 +24,6 @@
|
|||
#include "gerbview_actions.h"
|
||||
|
||||
|
||||
OPT<TOOL_EVENT> 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<TOOL_EVENT>();
|
||||
}
|
||||
|
||||
|
||||
// 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.
|
||||
|
|
|
@ -84,7 +84,7 @@ public:
|
|||
static TOOL_ACTION highlightAttribute;
|
||||
|
||||
///> @copydoc COMMON_ACTIONS::TranslateLegacyId()
|
||||
virtual OPT<TOOL_EVENT> TranslateLegacyId( int aId ) override;
|
||||
virtual OPT<TOOL_EVENT> TranslateLegacyId( int aId ) override { return OPT<TOOL_EVENT>(); }
|
||||
};
|
||||
|
||||
#endif // __GERBVIEW_ACTIONS_H
|
||||
|
|
Loading…
Reference in New Issue