From a7d7e8dcc6b40e67737b42ae1314a1526699563d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 15 Feb 2012 14:10:52 +0100 Subject: [PATCH] Pcbnew: fix Bug #932509 --- pcbnew/hotkeys_board_editor.cpp | 3 ++- pcbnew/hotkeys_module_editor.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) 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: