From 1983b2db050a17b09a172a4466fae97608ec33a0 Mon Sep 17 00:00:00 2001 From: Guillaume Simard Date: Thu, 22 Dec 2011 09:41:16 -0600 Subject: [PATCH] While working on the layer changing patch, I found that changing track size while routing (W, Ctrl+W) didn't update the track in the display window (you had to move the mouse to get a refresh). --- pcbnew/hotkeys_board_editor.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index ce1ee4b074..65152f962e 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -235,15 +235,29 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_SWITCH_TRACK_WIDTH_TO_NEXT: + if( GetCanvas()->m_mouseCaptureCallback == ShowNewTrackWhenMovingCursor ) + ShowNewTrackWhenMovingCursor( GetCanvas(), aDC, wxDefaultPosition, false ); + GetBoard()->m_TrackWidthSelector = ( GetBoard()->m_TrackWidthSelector + 1 ) % GetBoard()->m_TrackWidthList.size(); + + if( GetCanvas()->m_mouseCaptureCallback == ShowNewTrackWhenMovingCursor ) + ShowNewTrackWhenMovingCursor( GetCanvas(), aDC, wxDefaultPosition, false ); + break; case HK_SWITCH_TRACK_WIDTH_TO_PREVIOUS: + if( GetCanvas()->m_mouseCaptureCallback == ShowNewTrackWhenMovingCursor ) + ShowNewTrackWhenMovingCursor( GetCanvas(), aDC, wxDefaultPosition, false ); + if( GetBoard()->m_TrackWidthSelector == 0 ) GetBoard()->m_TrackWidthSelector = GetBoard()->m_TrackWidthList.size(); GetBoard()->m_TrackWidthSelector--; + + if( GetCanvas()->m_mouseCaptureCallback == ShowNewTrackWhenMovingCursor ) + ShowNewTrackWhenMovingCursor( GetCanvas(), aDC, wxDefaultPosition, false ); + break; case HK_SWITCH_GRID_TO_FASTGRID1: