Eeschema: fix block copy and cut command event handlers.
Popup menu IDs must be between START_RANGE and END_RANGE to get bound to the right event handler. Fixes: lp:1667730 * https://bugs.launchpad.net/kicad/+bug/1667730
This commit is contained in:
parent
0f943f1e4b
commit
8a21641639
|
@ -861,10 +861,10 @@ void AddMenusForBlock( wxMenu* PopMenu, SCH_EDIT_FRAME* frame )
|
|||
{
|
||||
msg = AddHotkeyName( _( "Cut Block" ), g_Schematic_Hokeys_Descr,
|
||||
HK_CUT_BLOCK );
|
||||
AddMenuItem( PopMenu, wxID_CUT, msg, KiBitmap( cut_xpm ) );
|
||||
AddMenuItem( PopMenu, ID_POPUP_CUT_BLOCK, msg, KiBitmap( cut_xpm ) );
|
||||
msg = AddHotkeyName( _( "Copy Block" ), g_Schematic_Hokeys_Descr,
|
||||
HK_COPY_BLOCK );
|
||||
AddMenuItem( PopMenu, wxID_COPY, msg, KiBitmap( copy_xpm ) );
|
||||
AddMenuItem( PopMenu, ID_POPUP_COPY_BLOCK, msg, KiBitmap( copy_xpm ) );
|
||||
AddMenuItem( PopMenu, ID_POPUP_DUPLICATE_BLOCK, _( "Duplicate Block" ),
|
||||
KiBitmap( duplicate_xpm ) );
|
||||
msg = AddHotkeyName( _( "Drag Block" ), g_Schematic_Hokeys_Descr,
|
||||
|
|
|
@ -124,6 +124,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
case wxID_CUT: // save and delete block
|
||||
case ID_POPUP_CUT_BLOCK:
|
||||
|
||||
if( screen->m_BlockLocate.GetCommand() != BLOCK_MOVE )
|
||||
break;
|
||||
|
@ -135,6 +136,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
case wxID_COPY: // really this is a Save block for paste
|
||||
case ID_POPUP_COPY_BLOCK:
|
||||
screen->m_BlockLocate.SetCommand( BLOCK_COPY );
|
||||
screen->m_BlockLocate.SetMessageBlock( this );
|
||||
HandleBlockEnd( &dc );
|
||||
|
|
|
@ -161,6 +161,8 @@ enum main_id
|
|||
ID_POPUP_MOVE_BLOCK,
|
||||
ID_POPUP_MOVE_BLOCK_EXACT,
|
||||
ID_POPUP_DRAG_BLOCK,
|
||||
ID_POPUP_COPY_BLOCK,
|
||||
ID_POPUP_CUT_BLOCK,
|
||||
ID_POPUP_DUPLICATE_BLOCK,
|
||||
ID_POPUP_ROTATE_BLOCK,
|
||||
ID_POPUP_DELETE_BLOCK,
|
||||
|
|
Loading…
Reference in New Issue