Commit 2571080e authored by Andrey Fedorushkov's avatar Andrey Fedorushkov

pcbnew: add hotkey 'D' - drag track segment keep slope

parent 9c61e5d1
...@@ -65,6 +65,8 @@ static Ki_HotkeyInfo HkAddNewTrack( wxT( "Add new track" ), HK_ADD_NEW_TRACK, 'X ...@@ -65,6 +65,8 @@ static Ki_HotkeyInfo HkAddNewTrack( wxT( "Add new track" ), HK_ADD_NEW_TRACK, 'X
static Ki_HotkeyInfo HkAddVia( wxT( "Add Via" ), HK_ADD_VIA, 'V' ); static Ki_HotkeyInfo HkAddVia( wxT( "Add Via" ), HK_ADD_VIA, 'V' );
static Ki_HotkeyInfo HkSwitchTrackPosture( wxT( "Switch Track Posture" ), static Ki_HotkeyInfo HkSwitchTrackPosture( wxT( "Switch Track Posture" ),
HK_SWITCH_TRACK_POSTURE, '/' ); HK_SWITCH_TRACK_POSTURE, '/' );
static Ki_HotkeyInfo HkDragTrackKeepSlope( wxT( "Drag track keep slope" ),
HK_DRAG_TRACK_KEEP_SLOPE, 'D' );
static Ki_HotkeyInfo HkAddMicroVia( wxT( "Add MicroVia" ), HK_ADD_MICROVIA, 'V' static Ki_HotkeyInfo HkAddMicroVia( wxT( "Add MicroVia" ), HK_ADD_MICROVIA, 'V'
+ GR_KB_CTRL ); + GR_KB_CTRL );
static Ki_HotkeyInfo HkEndTrack( wxT( "End Track" ), HK_END_TRACK, WXK_END ); static Ki_HotkeyInfo HkEndTrack( wxT( "End Track" ), HK_END_TRACK, WXK_END );
...@@ -154,6 +156,7 @@ Ki_HotkeyInfo* board_edit_Hotkey_List[] = ...@@ -154,6 +156,7 @@ Ki_HotkeyInfo* board_edit_Hotkey_List[] =
&HkBackspace, &HkBackspace,
&HkAddNewTrack, &HkAddVia, &HkAddMicroVia, &HkAddNewTrack, &HkAddVia, &HkAddMicroVia,
&HkSwitchTrackPosture, &HkSwitchTrackPosture,
&HkDragTrackKeepSlope,
&HkEndTrack, &HkMoveItem, &HkEndTrack, &HkMoveItem,
&HkFlipFootprint, &HkRotateItem, &HkDragFootprint, &HkFlipFootprint, &HkRotateItem, &HkDragFootprint,
&HkGetAndMoveFootprint, &HkLock_Unlock_Footprint, &HkSavefile, &HkGetAndMoveFootprint, &HkLock_Unlock_Footprint, &HkSavefile,
......
...@@ -23,6 +23,7 @@ enum hotkey_id_commnand { ...@@ -23,6 +23,7 @@ enum hotkey_id_commnand {
HK_ADD_VIA, HK_ADD_VIA,
HK_ADD_MICROVIA, HK_ADD_MICROVIA,
HK_SWITCH_TRACK_POSTURE, HK_SWITCH_TRACK_POSTURE,
HK_DRAG_TRACK_KEEP_SLOPE,
HK_END_TRACK, HK_END_TRACK,
HK_SAVE_BOARD, HK_LOAD_BOARD, HK_SAVE_BOARD, HK_LOAD_BOARD,
HK_SWITCH_UNITS, HK_SWITCH_UNITS,
......
...@@ -279,6 +279,10 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit ...@@ -279,6 +279,10 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
evt_type = ID_POPUP_PCB_SWITCH_TRACK_POSTURE ; evt_type = ID_POPUP_PCB_SWITCH_TRACK_POSTURE ;
break; break;
case HK_DRAG_TRACK_KEEP_SLOPE:
OnHotkeyMoveItem( HK_DRAG_TRACK_KEEP_SLOPE );
break;
case HK_ADD_NEW_TRACK: // Start new track case HK_ADD_NEW_TRACK: // Start new track
if( getActiveLayer() > LAYER_N_FRONT ) if( getActiveLayer() > LAYER_N_FRONT )
break; break;
...@@ -558,6 +562,8 @@ bool PCB_EDIT_FRAME::OnHotkeyMoveItem( int aIdCommand ) ...@@ -558,6 +562,8 @@ bool PCB_EDIT_FRAME::OnHotkeyMoveItem( int aIdCommand )
evt_type = ID_POPUP_PCB_MOVE_TRACK_NODE; evt_type = ID_POPUP_PCB_MOVE_TRACK_NODE;
if( aIdCommand == HK_DRAG_ITEM ) if( aIdCommand == HK_DRAG_ITEM )
evt_type = ID_POPUP_PCB_DRAG_TRACK_SEGMENT; evt_type = ID_POPUP_PCB_DRAG_TRACK_SEGMENT;
if( aIdCommand == HK_DRAG_TRACK_KEEP_SLOPE )
evt_type = ID_POPUP_PCB_DRAG_TRACK_SEGMENT_KEEP_SLOPE;
break; break;
case TYPE_MODULE: case TYPE_MODULE:
......
...@@ -414,8 +414,10 @@ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu ) ...@@ -414,8 +414,10 @@ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
} }
else else
{ {
msg = AddHotkeyName( _( "Drag Segments, Keep Slope" ), g_Board_Editor_Hokeys_Descr,
HK_DRAG_TRACK_KEEP_SLOPE );
ADD_MENUITEM( PopMenu, ID_POPUP_PCB_DRAG_TRACK_SEGMENT_KEEP_SLOPE, ADD_MENUITEM( PopMenu, ID_POPUP_PCB_DRAG_TRACK_SEGMENT_KEEP_SLOPE,
_( "Drag Segments, Keep Slope" ), drag_segment_withslope_xpm ); msg, drag_segment_withslope_xpm );
msg = AddHotkeyName( _( "Drag Segment" ), g_Board_Editor_Hokeys_Descr, msg = AddHotkeyName( _( "Drag Segment" ), g_Board_Editor_Hokeys_Descr,
HK_DRAG_ITEM ); HK_DRAG_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_PCB_DRAG_TRACK_SEGMENT, ADD_MENUITEM( PopMenu, ID_POPUP_PCB_DRAG_TRACK_SEGMENT,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment