Commit 30c7e318 authored by jean-pierre charras's avatar jean-pierre charras

Very minor fixes.

parent ea467e67
......@@ -139,7 +139,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* father, int idtype, const wxString& ti
GetTextSize( wxT( "dx 0234.567890 dx 0234.567890 d 0234.567890" ), stsbar ).x + 10,
// units display, Inches is bigger than mm
GetTextSize( wxT( "Inches" ), stsbar ).x + 10,
GetTextSize( _( "Inches" ), stsbar ).x + 10,
FUNCTION_DISPLAY_SIZE,
};
......@@ -428,11 +428,11 @@ void EDA_DRAW_FRAME::DisplayUnitsMsg()
break;
case MILLIMETRES:
msg += _( "mm" );
msg = _( "mm" );
break;
default:
msg += _( "Units" );
msg = _( "Units" );
break;
}
......
......@@ -104,7 +104,7 @@ void GERBVIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
if( aHotKey )
{
OnHotKey( aDC, aHotKey, NULL );
OnHotKey( aDC, aHotKey, aPosition );
}
UpdateStatusBar();
......
......@@ -476,10 +476,15 @@ public:
void OnQuit( wxCommandEvent& event );
/**
* Function OnHotKey
* called when on hotkey trigger
* Function OnHotKey.
* ** Commands are case insensitive **
* Some commands are relatives to the item under the mouse cursor
* @param aDC = current device context
* @param aHotkeyCode = hotkey code (ascii or wxWidget code for special keys)
* @param aPosition The cursor position in logical (drawing) units.
* @param aItem = NULL or pointer on a EDA_ITEM under the mouse cursor
*/
void OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct );
void OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosition, EDA_ITEM* aItem = NULL );
GERBER_DRAW_ITEM* GerberGeneralLocateAndDisplay();
GERBER_DRAW_ITEM* Locate( const wxPoint& aPosition, int typeloc );
......@@ -548,17 +553,6 @@ public:
*/
void ToPrinter( wxCommandEvent& event );
/* void Genere_HPGL( const wxString& FullFileName, int Layers );
* void Genere_GERBER( const wxString& FullFileName, int Layers );
* void Genere_PS( const wxString& FullFileName, int Layers );
* void Plot_Layer_HPGL( FILE* File, int masque_layer, int garde, bool trace_via,
* EDA_DRAW_MODE_T trace_mode );
* void Plot_Layer_GERBER( FILE* File, int masque_layer, int garde, bool trace_via,
* EDA_DRAW_MODE_T trace_mode );
* int Gen_D_CODE_File( const wxString& Name_File );
* void Plot_Layer_PS( FILE* File, int masque_layer, int garde, bool trace_via,
* EDA_DRAW_MODE_T trace_mode );
*/
void Files_io( wxCommandEvent& event );
/**
......
......@@ -71,23 +71,26 @@ struct EDA_HOTKEY_CONFIG s_Gerbview_Hokeys_Descr[] =
};
/* Hot keys. Some commands are relatives to the item under the mouse cursor
* Commands are case insensitive
* @param DC = current device context
* @param hotkey = hotkey code (ascii or wxWidget code for special keys)
* @param DrawStruct = NULL or pointer on a EDA_ITEM under the mouse cursor
/*
* Function OnHotKey.
* ** Commands are case insensitive **
* Some commands are relatives to the item under the mouse cursor
* aDC = current device context
* aHotkeyCode = hotkey code (ascii or wxWidget code for special keys)
* aPosition The cursor position in logical (drawing) units.
* aItem = NULL or pointer on a EDA_ITEM under the mouse cursor
*/
void GERBVIEW_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct )
void GERBVIEW_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosition, EDA_ITEM* aItem )
{
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
cmd.SetEventObject( this );
/* Convert lower to upper case (the usual toupper function has problem with non ascii
* codes like function keys */
if( (hotkey >= 'a') && (hotkey <= 'z') )
hotkey += 'A' - 'a';
if( (aHotkeyCode >= 'a') && (aHotkeyCode <= 'z') )
aHotkeyCode += 'A' - 'a';
EDA_HOTKEY * HK_Descr = GetDescriptorFromHotkey( hotkey, s_Gerbview_Hotkey_List );
EDA_HOTKEY * HK_Descr = GetDescriptorFromHotkey( aHotkeyCode, s_Gerbview_Hotkey_List );
if( HK_Descr == NULL )
return;
......
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