From cdaba24f0df32b521a793cb94a636a4b35ee78bf Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 28 May 2019 20:33:17 -0700 Subject: [PATCH] pcbnew: Remove some legacy code The menu IDs were used for disambiguation in legacy canvas. --- include/pcb_base_frame.h | 2 -- pcbnew/footprint_edit_frame.cpp | 2 -- pcbnew/pcb_base_frame.cpp | 17 ----------------- pcbnew/pcbnew_id.h | 4 ---- 4 files changed, 25 deletions(-) diff --git a/include/pcb_base_frame.h b/include/pcb_base_frame.h index 6daeff965a..c5b182a0c3 100644 --- a/include/pcb_base_frame.h +++ b/include/pcb_base_frame.h @@ -239,8 +239,6 @@ public: */ virtual bool CreateAndShow3D_Frame( bool aForceRecreateIfNotOwner ); - void ProcessItemSelection( wxCommandEvent& event ); - /** * Function GetCollectorsGuide * @return GENERAL_COLLECTORS_GUIDE - that considers the global diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index c5e7ca8ce5..6a6277c0a7 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -80,8 +80,6 @@ BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME ) - EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_END, - PCB_BASE_FRAME::ProcessItemSelection ) EVT_CLOSE( FOOTPRINT_EDIT_FRAME::OnCloseWindow ) EVT_MENU( wxID_EXIT, FOOTPRINT_EDIT_FRAME::CloseModuleEditor ) diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index 1f9231f54d..0e96c664f5 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -74,9 +74,6 @@ static const wxChar FastGrid2Entry[] = wxT( "FastGrid2" ); BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME ) - EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_END, - PCB_BASE_FRAME::ProcessItemSelection ) - EVT_TOOL( ID_TB_OPTIONS_SHOW_PADS_SKETCH, PCB_BASE_FRAME::OnTogglePadDrawMode ) EVT_TOOL( ID_TB_OPTIONS_SHOW_GRAPHIC_SKETCH, PCB_BASE_FRAME::OnToggleGraphicDrawMode ) EVT_TOOL( ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH, PCB_BASE_FRAME::OnToggleEdgeDrawMode ) @@ -599,20 +596,6 @@ void PCB_BASE_FRAME::OnUpdateSelectZoom( wxUpdateUIEvent& aEvent ) } -void PCB_BASE_FRAME::ProcessItemSelection( wxCommandEvent& aEvent ) -{ - int id = aEvent.GetId(); - - if( id >= ID_POPUP_PCB_ITEM_SELECTION_START && id <= ID_POPUP_PCB_ITEM_SELECTION_END ) - { - int itemNdx = id - ID_POPUP_PCB_ITEM_SELECTION_START; - // JEY TODO: is this still called? Or do we do this in the selection tool? - - m_canvas->SetAbortRequest( false ); - } -} - - GENERAL_COLLECTORS_GUIDE PCB_BASE_FRAME::GetCollectorsGuide() { GENERAL_COLLECTORS_GUIDE guide( m_Pcb->GetVisibleLayers(), GetActiveLayer(), diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 0961a91e6c..49e244458a 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -121,10 +121,6 @@ enum pcbnew_ids ID_POPUP_PCB_SELECT_DIFFPAIR16, ID_POPUP_PCB_SELECT_WIDTH_END_RANGE, - // reserve a block of MAX_ITEMS_IN_PICKER ids for the item selection popup - ID_POPUP_PCB_ITEM_SELECTION_START, - ID_POPUP_PCB_ITEM_SELECTION_END = MAX_ITEMS_IN_PICKER + ID_POPUP_PCB_ITEM_SELECTION_START, - ID_MENU_READ_BOARD_BACKUP_FILE, ID_MENU_RECOVER_BOARD_AUTOSAVE, ID_MENU_ARCHIVE_MODULES,