diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index cbfc2ab89e..ae82aac6c5 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -415,7 +415,8 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_SWITCH_UNITS: - g_UserUnit = (g_UserUnit == INCHES) ? MILLIMETRES : INCHES; + evt_type = (g_UserUnit == INCHES) ? + ID_TB_OPTIONS_SELECT_UNIT_MM : ID_TB_OPTIONS_SELECT_UNIT_INCH; break; case HK_SWITCH_TRACK_DISPLAY_MODE: diff --git a/pcbnew/hotkeys_module_editor.cpp b/pcbnew/hotkeys_module_editor.cpp index 0034545b77..88529c24ee 100644 --- a/pcbnew/hotkeys_module_editor.cpp +++ b/pcbnew/hotkeys_module_editor.cpp @@ -60,7 +60,9 @@ void FOOTPRINT_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPos break; case HK_SWITCH_UNITS: - g_UserUnit = (g_UserUnit == INCHES) ? MILLIMETRES : INCHES; + cmd.SetId( (g_UserUnit == INCHES) ? + ID_TB_OPTIONS_SELECT_UNIT_MM : ID_TB_OPTIONS_SELECT_UNIT_INCH ); + GetEventHandler()->ProcessEvent( cmd ); break; case HK_ZOOM_IN: