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

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

parent 9c61e5d1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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 HkSwitchTrackPosture( wxT( "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'
                                    + GR_KB_CTRL );
static Ki_HotkeyInfo HkEndTrack( wxT( "End Track" ), HK_END_TRACK, WXK_END );
@@ -154,6 +156,7 @@ Ki_HotkeyInfo* board_edit_Hotkey_List[] =
    &HkBackspace,
    &HkAddNewTrack,            &HkAddVia,                    &HkAddMicroVia,
    &HkSwitchTrackPosture,
    &HkDragTrackKeepSlope,
    &HkEndTrack,               &HkMoveItem,
    &HkFlipFootprint,          &HkRotateItem,                &HkDragFootprint,
    &HkGetAndMoveFootprint,    &HkLock_Unlock_Footprint,     &HkSavefile,
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ enum hotkey_id_commnand {
    HK_ADD_VIA,
    HK_ADD_MICROVIA,
    HK_SWITCH_TRACK_POSTURE,
    HK_DRAG_TRACK_KEEP_SLOPE,
    HK_END_TRACK,
    HK_SAVE_BOARD, HK_LOAD_BOARD,
    HK_SWITCH_UNITS,
+6 −0
Original line number Diff line number Diff line
@@ -279,6 +279,10 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
        evt_type = ID_POPUP_PCB_SWITCH_TRACK_POSTURE ;
        break;

    case HK_DRAG_TRACK_KEEP_SLOPE:
        OnHotkeyMoveItem( HK_DRAG_TRACK_KEEP_SLOPE );
        break;

    case HK_ADD_NEW_TRACK: // Start new track
        if( getActiveLayer() > LAYER_N_FRONT )
            break;
@@ -558,6 +562,8 @@ bool PCB_EDIT_FRAME::OnHotkeyMoveItem( int aIdCommand )
            evt_type = ID_POPUP_PCB_MOVE_TRACK_NODE;
        if( aIdCommand == HK_DRAG_ITEM )
            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;

    case TYPE_MODULE:
+3 −1
Original line number Diff line number Diff line
@@ -414,8 +414,10 @@ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
            }
            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,
                              _( "Drag Segments, Keep Slope" ), drag_segment_withslope_xpm );
                              msg, drag_segment_withslope_xpm );
                msg = AddHotkeyName( _( "Drag Segment" ), g_Board_Editor_Hokeys_Descr,
                                     HK_DRAG_ITEM );
                ADD_MENUITEM( PopMenu, ID_POPUP_PCB_DRAG_TRACK_SEGMENT,