From eb97634bdf2c2fbae83dcc723e24ddb60db96d2c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 15 Jun 2018 17:10:12 +0200 Subject: [PATCH] Enable 'Delete Item' toolbar icon in the Footprint Editor when the tool is active --- pcbnew/tools/pcbnew_control.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 2712c3178b..a0cd76671c 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -818,8 +818,8 @@ int PCBNEW_CONTROL::DeleteItemCursor( const TOOL_EVENT& aEvent ) PICKER_TOOL* picker = m_toolMgr->GetTool(); assert( picker ); - // TODO it will not check the toolbar button in the module editor, as it uses a different ID.. - m_frame->SetToolID( ID_PCB_DELETE_ITEM_BUTT, wxCURSOR_BULLSEYE, _( "Delete item" ) ); + m_frame->SetToolID( m_editModules ? ID_MODEDIT_DELETE_TOOL : ID_PCB_DELETE_ITEM_BUTT, + wxCURSOR_BULLSEYE, _( "Delete item" ) ); picker->SetSnapping( false ); picker->SetClickHandler( std::bind( deleteItem, m_toolMgr, _1 ) ); picker->Activate();