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 ...@@ -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, GetTextSize( wxT( "dx 0234.567890 dx 0234.567890 d 0234.567890" ), stsbar ).x + 10,
// units display, Inches is bigger than mm // units display, Inches is bigger than mm
GetTextSize( wxT( "Inches" ), stsbar ).x + 10, GetTextSize( _( "Inches" ), stsbar ).x + 10,
FUNCTION_DISPLAY_SIZE, FUNCTION_DISPLAY_SIZE,
}; };
...@@ -428,11 +428,11 @@ void EDA_DRAW_FRAME::DisplayUnitsMsg() ...@@ -428,11 +428,11 @@ void EDA_DRAW_FRAME::DisplayUnitsMsg()
break; break;
case MILLIMETRES: case MILLIMETRES:
msg += _( "mm" ); msg = _( "mm" );
break; break;
default: default:
msg += _( "Units" ); msg = _( "Units" );
break; break;
} }
......
...@@ -104,7 +104,7 @@ void GERBVIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH ...@@ -104,7 +104,7 @@ void GERBVIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
if( aHotKey ) if( aHotKey )
{ {
OnHotKey( aDC, aHotKey, NULL ); OnHotKey( aDC, aHotKey, aPosition );
} }
UpdateStatusBar(); UpdateStatusBar();
......
...@@ -476,10 +476,15 @@ public: ...@@ -476,10 +476,15 @@ public:
void OnQuit( wxCommandEvent& event ); void OnQuit( wxCommandEvent& event );
/** /**
* Function OnHotKey * Function OnHotKey.
* called when on hotkey trigger * ** 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* GerberGeneralLocateAndDisplay();
GERBER_DRAW_ITEM* Locate( const wxPoint& aPosition, int typeloc ); GERBER_DRAW_ITEM* Locate( const wxPoint& aPosition, int typeloc );
...@@ -548,17 +553,6 @@ public: ...@@ -548,17 +553,6 @@ public:
*/ */
void ToPrinter( wxCommandEvent& event ); 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 ); void Files_io( wxCommandEvent& event );
/** /**
......
...@@ -71,23 +71,26 @@ struct EDA_HOTKEY_CONFIG s_Gerbview_Hokeys_Descr[] = ...@@ -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 * Function OnHotKey.
* @param DC = current device context * ** Commands are case insensitive **
* @param hotkey = hotkey code (ascii or wxWidget code for special keys) * Some commands are relatives to the item under the mouse cursor
* @param DrawStruct = NULL or pointer on a EDA_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 ); wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
cmd.SetEventObject( this ); cmd.SetEventObject( this );
/* Convert lower to upper case (the usual toupper function has problem with non ascii /* Convert lower to upper case (the usual toupper function has problem with non ascii
* codes like function keys */ * codes like function keys */
if( (hotkey >= 'a') && (hotkey <= 'z') ) if( (aHotkeyCode >= 'a') && (aHotkeyCode <= 'z') )
hotkey += 'A' - 'a'; 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 ) if( HK_Descr == NULL )
return; 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