small change on hotkey management. Added: drag component

This commit is contained in:
CHARRAS 2007-09-22 14:31:20 +00:00
parent 3e3ae8925a
commit ba04f83247
15 changed files with 825 additions and 681 deletions

View File

@ -4,6 +4,18 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2007-sept-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+ all
* small change in hotkeys handling
(Ki_HotkeyInfo: new member m_IdMenuEvent to call an existing event handler from a hotkey list)
+ eeschema:
* added drag component in pop up menu and hotkeys
* plot svg format: incorrect arc draw fixed
2007-Sep-22 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Sep-22 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================ ================================================================================
+ pcbnew + pcbnew

View File

@ -166,10 +166,11 @@ char Line[256];
void PlotPolyPS(int nb_segm, int * coord, int fill, int width) void PlotPolyPS(int nb_segm, int * coord, int fill, int width)
/*****************************************************************/ /*****************************************************************/
/* Trace un polygone ( ferme si rempli ) en format POSTSCRIPT /* Draw a polygon ( a filled polygon if fill == 1 ) in POSTSCRIPT format
* coord = tableau des coord des sommets * @param nb_segm = corner count
* nb_segm = nombre de coord ( 1 coord = 2 elements: X et Y du tableau ) * @param coord = corner list (a corner uses 2 int = X coordinate followed by Y coordinate
* fill : si != 0 polygone rempli * @param fill :if == 0 : filled polygon
* @param width = line width
*/ */
{ {
int ii; int ii;

File diff suppressed because it is too large Load Diff

View File

@ -18,11 +18,12 @@
* This class allows the real key code changed by user from a key code list file * This class allows the real key code changed by user from a key code list file
*/ */
Ki_HotkeyInfo::Ki_HotkeyInfo( const wxChar* infomsg, int idcommand, int keycode ) Ki_HotkeyInfo::Ki_HotkeyInfo( const wxChar* infomsg, int idcommand, int keycode, int idmenuevent )
{ {
m_KeyCode = keycode; // Key code (ascii value for ascii keys or wxWidgets code for function key m_KeyCode = keycode; // Key code (ascii value for ascii keys or wxWidgets code for function key
m_InfoMsg = infomsg; // info message. m_InfoMsg = infomsg; // info message.
m_Idcommand = idcommand; // internal id for the corresponding command (see hotkey_id_commnand list) m_Idcommand = idcommand; // internal id for the corresponding command (see hotkey_id_commnand list)
m_IdMenuEvent = idmenuevent; // id to call the corresponding event (if any) (see id.h)
} }
@ -37,101 +38,101 @@ struct hotkey_name_descr
static struct hotkey_name_descr s_Hotkey_Name_List[] = static struct hotkey_name_descr s_Hotkey_Name_List[] =
{ {
{ wxT( "F1" ), WXK_F1 }, { wxT( "F1" ), WXK_F1 },
{ wxT( "F2" ), WXK_F2 }, { wxT( "F2" ), WXK_F2 },
{ wxT( "F3" ), WXK_F3 }, { wxT( "F3" ), WXK_F3 },
{ wxT( "F4" ), WXK_F4 }, { wxT( "F4" ), WXK_F4 },
{ wxT( "F5" ), WXK_F5 }, { wxT( "F5" ), WXK_F5 },
{ wxT( "F6" ), WXK_F6 }, { wxT( "F6" ), WXK_F6 },
{ wxT( "F7" ), WXK_F7 }, { wxT( "F7" ), WXK_F7 },
{ wxT( "F8" ), WXK_F8 }, { wxT( "F8" ), WXK_F8 },
{ wxT( "F9" ), WXK_F9 }, { wxT( "F9" ), WXK_F9 },
{ wxT( "F10" ), WXK_F10 }, { wxT( "F10" ), WXK_F10 },
{ wxT( "F11" ), WXK_F11 }, { wxT( "F11" ), WXK_F11 },
{ wxT( "F12" ), WXK_F12 }, { wxT( "F12" ), WXK_F12 },
{ wxT( "Esc" ), WXK_ESCAPE }, { wxT( "Esc" ), WXK_ESCAPE },
{ wxT( "Delete" ), WXK_DELETE }, { wxT( "Delete" ), WXK_DELETE },
{ wxT( "Esc" ), WXK_ESCAPE }, { wxT( "Esc" ), WXK_ESCAPE },
{ wxT( "Tab" ), '\t' }, { wxT( "Tab" ), '\t' },
{ wxT( "Backspace" ), WXK_BACK }, { wxT( "Backspace" ), WXK_BACK },
{ wxT( "Insert" ), WXK_INSERT }, { wxT( "Insert" ), WXK_INSERT },
{ wxT( "End" ), WXK_END }, { wxT( "End" ), WXK_END },
{ wxT( "Page Up" ), WXK_PAGEUP }, { wxT( "Page Up" ), WXK_PAGEUP },
{ wxT( "Page Down" ), WXK_PAGEDOWN }, { wxT( "Page Down" ), WXK_PAGEDOWN },
{ wxT( "+" ), WXK_ADD }, { wxT( "+" ), WXK_ADD },
{ wxT( "-" ), WXK_SUBTRACT }, { wxT( "-" ), WXK_SUBTRACT },
{ wxT( "Up" ), WXK_UP }, { wxT( "Up" ), WXK_UP },
{ wxT( "Down" ), WXK_DOWN }, { wxT( "Down" ), WXK_DOWN },
{ wxT( "Left" ), WXK_LEFT }, { wxT( "Left" ), WXK_LEFT },
{ wxT( "Right" ), WXK_RIGHT }, { wxT( "Right" ), WXK_RIGHT },
{ wxT( "space" ), ' ' }, { wxT( "space" ), ' ' },
{ wxT( "?" ), '?' }, { wxT( "?" ), '?' },
{ wxT( "!" ), '!' }, { wxT( "!" ), '!' },
{ wxT( ":" ), ':' }, { wxT( ":" ), ':' },
{ wxT( "," ), ',' }, { wxT( "," ), ',' },
{ wxT( "*" ), '*' }, { wxT( "*" ), '*' },
{ wxT( "+" ), '+' }, { wxT( "+" ), '+' },
{ wxT( "-" ), '-' }, { wxT( "-" ), '-' },
{ wxT( "\%" ), '%' }, { wxT( "\%" ), '%' },
{ wxT( "A" ), 'A' }, { wxT( "A" ), 'A' },
{ wxT( "B" ), 'B' }, { wxT( "B" ), 'B' },
{ wxT( "C" ), 'C' }, { wxT( "C" ), 'C' },
{ wxT( "D" ), 'D' }, { wxT( "D" ), 'D' },
{ wxT( "E" ), 'E' }, { wxT( "E" ), 'E' },
{ wxT( "F" ), 'F' }, { wxT( "F" ), 'F' },
{ wxT( "G" ), 'G' }, { wxT( "G" ), 'G' },
{ wxT( "H" ), 'H' }, { wxT( "H" ), 'H' },
{ wxT( "I" ), 'I' }, { wxT( "I" ), 'I' },
{ wxT( "J" ), 'J' }, { wxT( "J" ), 'J' },
{ wxT( "K" ), 'K' }, { wxT( "K" ), 'K' },
{ wxT( "L" ), 'L' }, { wxT( "L" ), 'L' },
{ wxT( "M" ), 'M' }, { wxT( "M" ), 'M' },
{ wxT( "N" ), 'N' }, { wxT( "N" ), 'N' },
{ wxT( "O" ), 'O' }, { wxT( "O" ), 'O' },
{ wxT( "P" ), 'P' }, { wxT( "P" ), 'P' },
{ wxT( "Q" ), 'Q' }, { wxT( "Q" ), 'Q' },
{ wxT( "R" ), 'R' }, { wxT( "R" ), 'R' },
{ wxT( "S" ), 'S' }, { wxT( "S" ), 'S' },
{ wxT( "T" ), 'T' }, { wxT( "T" ), 'T' },
{ wxT( "U" ), 'U' }, { wxT( "U" ), 'U' },
{ wxT( "V" ), 'V' }, { wxT( "V" ), 'V' },
{ wxT( "W" ), 'W' }, { wxT( "W" ), 'W' },
{ wxT( "X" ), 'X' }, { wxT( "X" ), 'X' },
{ wxT( "Y" ), 'Y' }, { wxT( "Y" ), 'Y' },
{ wxT( "Z" ), 'Z' }, { wxT( "Z" ), 'Z' },
{ wxT( "Ctrl A" ), GR_KB_CTRL + 'A' }, { wxT( "Ctrl A" ), GR_KB_CTRL + 'A' },
{ wxT( "Ctrl B" ), GR_KB_CTRL + 'B' }, { wxT( "Ctrl B" ), GR_KB_CTRL + 'B' },
{ wxT( "Ctrl C" ), GR_KB_CTRL + 'C' }, { wxT( "Ctrl C" ), GR_KB_CTRL + 'C' },
{ wxT( "Ctrl D" ), GR_KB_CTRL + 'D' }, { wxT( "Ctrl D" ), GR_KB_CTRL + 'D' },
{ wxT( "Ctrl E" ), GR_KB_CTRL + 'E' }, { wxT( "Ctrl E" ), GR_KB_CTRL + 'E' },
{ wxT( "Ctrl F" ), GR_KB_CTRL + 'F' }, { wxT( "Ctrl F" ), GR_KB_CTRL + 'F' },
{ wxT( "Ctrl G" ), GR_KB_CTRL + 'G' }, { wxT( "Ctrl G" ), GR_KB_CTRL + 'G' },
{ wxT( "Ctrl H" ), GR_KB_CTRL + 'H' }, { wxT( "Ctrl H" ), GR_KB_CTRL + 'H' },
{ wxT( "Ctrl I" ), GR_KB_CTRL + 'I' }, { wxT( "Ctrl I" ), GR_KB_CTRL + 'I' },
{ wxT( "Ctrl J" ), GR_KB_CTRL + 'J' }, { wxT( "Ctrl J" ), GR_KB_CTRL + 'J' },
{ wxT( "Ctrl K" ), GR_KB_CTRL + 'K' }, { wxT( "Ctrl K" ), GR_KB_CTRL + 'K' },
{ wxT( "Ctrl L" ), GR_KB_CTRL + 'L' }, { wxT( "Ctrl L" ), GR_KB_CTRL + 'L' },
{ wxT( "Ctrl M" ), GR_KB_CTRL + 'M' }, { wxT( "Ctrl M" ), GR_KB_CTRL + 'M' },
{ wxT( "Ctrl N" ), GR_KB_CTRL + 'N' }, { wxT( "Ctrl N" ), GR_KB_CTRL + 'N' },
{ wxT( "Ctrl O" ), GR_KB_CTRL + 'O' }, { wxT( "Ctrl O" ), GR_KB_CTRL + 'O' },
{ wxT( "Ctrl P" ), GR_KB_CTRL + 'P' }, { wxT( "Ctrl P" ), GR_KB_CTRL + 'P' },
{ wxT( "Ctrl Q" ), GR_KB_CTRL + 'Q' }, { wxT( "Ctrl Q" ), GR_KB_CTRL + 'Q' },
{ wxT( "Ctrl R" ), GR_KB_CTRL + 'R' }, { wxT( "Ctrl R" ), GR_KB_CTRL + 'R' },
{ wxT( "Ctrl S" ), GR_KB_CTRL + 'S' }, { wxT( "Ctrl S" ), GR_KB_CTRL + 'S' },
{ wxT( "Ctrl T" ), GR_KB_CTRL + 'T' }, { wxT( "Ctrl T" ), GR_KB_CTRL + 'T' },
{ wxT( "Ctrl U" ), GR_KB_CTRL + 'U' }, { wxT( "Ctrl U" ), GR_KB_CTRL + 'U' },
{ wxT( "Ctrl V" ), GR_KB_CTRL + 'V' }, { wxT( "Ctrl V" ), GR_KB_CTRL + 'V' },
{ wxT( "Ctrl W" ), GR_KB_CTRL + 'W' }, { wxT( "Ctrl W" ), GR_KB_CTRL + 'W' },
{ wxT( "Ctrl X" ), GR_KB_CTRL + 'X' }, { wxT( "Ctrl X" ), GR_KB_CTRL + 'X' },
{ wxT( "Ctrl Y" ), GR_KB_CTRL + 'Y' }, { wxT( "Ctrl Y" ), GR_KB_CTRL + 'Y' },
{ wxT( "Ctrl Z" ), GR_KB_CTRL + 'Z' }, { wxT( "Ctrl Z" ), GR_KB_CTRL + 'Z' },
{ wxT( "" ), 0 } // Do not change: end of list { wxT( "" ), 0 } // Do not change: end of list
}; };
@ -315,25 +316,25 @@ void DisplayHotkeyList( WinEDA_DrawFrame* frame, struct Ki_HotkeyInfoSectionDesc
} }
/******************************************************************/ /************************************************************************/
int GetCommandCodeFromHotkey( int key, Ki_HotkeyInfo** List ) Ki_HotkeyInfo* GetDescriptorFromHotkey( int key, Ki_HotkeyInfo** List )
/******************************************************************/ /***********************************************************************/
/* /*
* Return an id identifier fron a key code for OnHotKey() function * Return a Ki_HotkeyInfo * pointer fron a key code for OnHotKey() function
* @param key = key code (ascii value, or wxWidgets value for function keys * @param key = key code (ascii value, or wxWidgets value for function keys
* @param List = pointer to a Ki_HotkeyInfo list of commands * @param List = pointer to a Ki_HotkeyInfo list of commands
* @return the corresponding function identifier from the Ki_HotkeyInfo List * @return the corresponding Ki_HotkeyInfo * pointer from the Ki_HotkeyInfo List
*/ */
{ {
for( ; *List != NULL; List++ ) for( ; *List != NULL; List++ )
{ {
Ki_HotkeyInfo* hk_decr = *List; Ki_HotkeyInfo* hk_decr = *List;
if( hk_decr->m_KeyCode == key ) if( hk_decr->m_KeyCode == key )
return hk_decr->m_Idcommand; return hk_decr;
} }
return 0; return NULL;
} }
@ -606,8 +607,9 @@ void AddHotkeyConfigMenu( wxMenu* menu )
if( menu == NULL ) if( menu == NULL )
return; return;
item = new wxMenuItem( menu, ID_PREFERENCES_CREATE_CONFIG_HOTKEYS, item = new wxMenuItem( menu, ID_PREFERENCES_CREATE_CONFIG_HOTKEYS,
_( "Create Hotkey config file" ), _( "Create Hotkey config file" ),
_( "Create or Recreate the hotkey config file from current hotkey list" ) ); _( "Create or Recreate the hotkey config file from current hotkey list" )
);
item->SetBitmap( save_setup_xpm ); item->SetBitmap( save_setup_xpm );
menu->Append( item ); menu->Append( item );
item = new wxMenuItem( menu, ID_PREFERENCES_READ_CONFIG_HOTKEYS, item = new wxMenuItem( menu, ID_PREFERENCES_READ_CONFIG_HOTKEYS,
@ -623,64 +625,67 @@ void AddHotkeyConfigMenu( wxMenu* menu )
wxMenu* submenu_hkcfg = new wxMenu(); wxMenu* submenu_hkcfg = new wxMenu();
item = new wxMenuItem( submenu_hkcfg, ID_PREFERENCES_HOTKEY_PATH_IS_HOME, item = new wxMenuItem( submenu_hkcfg, ID_PREFERENCES_HOTKEY_PATH_IS_HOME,
_( "home directory" ), _( "home directory" ),
_( "Use home directory to load or store Hotkey config files" ), _( "Use home directory to load or store Hotkey config files" ),
wxITEM_CHECK ); wxITEM_CHECK );
submenu_hkcfg->Append( item ); submenu_hkcfg->Append( item );
item = new wxMenuItem( submenu_hkcfg, ID_PREFERENCES_HOTKEY_PATH_IS_KICAD, item = new wxMenuItem( submenu_hkcfg, ID_PREFERENCES_HOTKEY_PATH_IS_KICAD,
_( "kicad/template directory" ), _( "kicad/template directory" ),
_( "Use kicad/templatedirectory to load or store Hotkey config files" ), _( "Use kicad/templatedirectory to load or store Hotkey config files" ),
wxITEM_CHECK ); wxITEM_CHECK );
submenu_hkcfg->Append( item ); submenu_hkcfg->Append( item );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( menu, submenu_hkcfg, ADD_MENUITEM_WITH_HELP_AND_SUBMENU( menu, submenu_hkcfg,
-1, -1,
_( "Hotkey config location" ), _( "Hotkey config location" ),
_( "Hotkey config file location selection (home directory or kicad tree)" ), _(
"Hotkey config file location selection (home directory or kicad tree)" ),
right_xpm ); right_xpm );
submenu_hkcfg->Check(ID_PREFERENCES_HOTKEY_PATH_IS_HOME, submenu_hkcfg->Check( ID_PREFERENCES_HOTKEY_PATH_IS_HOME,
g_ConfigFileLocationChoice == 0); g_ConfigFileLocationChoice == 0 );
submenu_hkcfg->Check(ID_PREFERENCES_HOTKEY_PATH_IS_KICAD, submenu_hkcfg->Check( ID_PREFERENCES_HOTKEY_PATH_IS_KICAD,
g_ConfigFileLocationChoice == 1); g_ConfigFileLocationChoice == 1 );
} }
/************************************************************************/ /************************************************************************/
void HandleHotkeyConfigMenuSelection( WinEDA_DrawFrame * frame, int id ) void HandleHotkeyConfigMenuSelection( WinEDA_DrawFrame* frame, int id )
/************************************************************************/ /************************************************************************/
/* called on hotkey file location selecton menu /* called on hotkey file location selecton menu
* @param frame = current WinEDA_DrawFrame * @param frame = current WinEDA_DrawFrame
* @param id = selected menu id * @param id = selected menu id
* @return g_ConfigFileLocationChoice (global) = new selection * @return g_ConfigFileLocationChoice (global) = new selection
*/ */
{ {
wxMenuBar * menu = frame->GetMenuBar(); wxMenuBar* menu = frame->GetMenuBar();
switch (id ) switch( id )
{ {
case ID_PREFERENCES_HOTKEY_PATH_IS_HOME: case ID_PREFERENCES_HOTKEY_PATH_IS_HOME:
if ( g_ConfigFileLocationChoice != 0 ) if( g_ConfigFileLocationChoice != 0 )
{ {
g_ConfigFileLocationChoice = 0; g_ConfigFileLocationChoice = 0;
menu->Check(ID_PREFERENCES_HOTKEY_PATH_IS_HOME, true); menu->Check( ID_PREFERENCES_HOTKEY_PATH_IS_HOME, true );
menu->Check(ID_PREFERENCES_HOTKEY_PATH_IS_KICAD, false); menu->Check( ID_PREFERENCES_HOTKEY_PATH_IS_KICAD, false );
frame->m_Parent->m_EDA_CommonConfig->Write(HOTKEY_CFG_PATH_OPT, g_ConfigFileLocationChoice); frame->m_Parent->m_EDA_CommonConfig->Write( HOTKEY_CFG_PATH_OPT,
} g_ConfigFileLocationChoice );
break; }
break;
case ID_PREFERENCES_HOTKEY_PATH_IS_KICAD: case ID_PREFERENCES_HOTKEY_PATH_IS_KICAD:
if ( g_ConfigFileLocationChoice != 1 ) if( g_ConfigFileLocationChoice != 1 )
{ {
g_ConfigFileLocationChoice = 1; g_ConfigFileLocationChoice = 1;
menu->Check(ID_PREFERENCES_HOTKEY_PATH_IS_HOME, false); menu->Check( ID_PREFERENCES_HOTKEY_PATH_IS_HOME, false );
menu->Check(ID_PREFERENCES_HOTKEY_PATH_IS_KICAD, true); menu->Check( ID_PREFERENCES_HOTKEY_PATH_IS_KICAD, true );
frame->m_Parent->m_EDA_CommonConfig->Write(HOTKEY_CFG_PATH_OPT, g_ConfigFileLocationChoice); frame->m_Parent->m_EDA_CommonConfig->Write( HOTKEY_CFG_PATH_OPT,
} g_ConfigFileLocationChoice );
break; }
break;
default: default:
break; break;
} }
} }

View File

@ -15,7 +15,7 @@
#include "colors.h" #include "colors.h"
// Define print format d to display a schematic component line // Define print format d to display a schematic component line
#define CMP_FORMAT wxT("%3d %+8s - %+16s : %-.32s") #define CMP_FORMAT wxT("%3d %8s - %16s : %-.32s")
#define FILTERFOOTPRINTKEY "FilterFootprint" #define FILTERFOOTPRINTKEY "FilterFootprint"

View File

@ -27,7 +27,7 @@
* add the HkMyNewEntry pointer in the s_Schematic_Hotkey_List list or the s_LibEdit_Hotkey_List list * add the HkMyNewEntry pointer in the s_Schematic_Hotkey_List list or the s_LibEdit_Hotkey_List list
* ( or s_Common_Hotkey_List if the same command is added both in eeschema and libedit) * ( or s_Common_Hotkey_List if the same command is added both in eeschema and libedit)
* Add the new code in the switch in OnHotKey() function. * Add the new code in the switch in OnHotKey() function.
* when the variable PopupOn is true, an item is currently edited. * when the variable ItemInEdit is true, an item is currently edited.
* This can be usefull if the new function cannot be executed while an item is currently being edited * This can be usefull if the new function cannot be executed while an item is currently being edited
* ( For example, one cannot start a new wire when a component is moving.) * ( For example, one cannot start a new wire when a component is moving.)
* *
@ -48,8 +48,8 @@ static Ki_HotkeyInfo HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 );
static Ki_HotkeyInfo HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1 ); static Ki_HotkeyInfo HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1 );
static Ki_HotkeyInfo HkHelp( wxT( "Help: this message" ), HK_HELP, '?' ); static Ki_HotkeyInfo HkHelp( wxT( "Help: this message" ), HK_HELP, '?' );
static Ki_HotkeyInfo HkResetLocalCoord( wxT( "Reset local coord." ), HK_RESET_LOCAL_COORD, ' ' ); static Ki_HotkeyInfo HkResetLocalCoord( wxT( "Reset local coord." ), HK_RESET_LOCAL_COORD, ' ' );
static Ki_HotkeyInfo HkUndo( wxT( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z' ); static Ki_HotkeyInfo HkUndo( wxT( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int)ID_SCHEMATIC_UNDO );
static Ki_HotkeyInfo HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y' ); static Ki_HotkeyInfo HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int)ID_SCHEMATIC_REDO );
// Schematic editor // Schematic editor
static Ki_HotkeyInfo HkBeginWire( wxT( "begin Wire" ), HK_BEGIN_WIRE, 'W' ); static Ki_HotkeyInfo HkBeginWire( wxT( "begin Wire" ), HK_BEGIN_WIRE, 'W' );
@ -62,7 +62,8 @@ static Ki_HotkeyInfo HkOrientNormalComponent( wxT(
"Orient Normal Component" ), "Orient Normal Component" ),
HK_ORIENT_NORMAL_COMPONENT, 'N' ); HK_ORIENT_NORMAL_COMPONENT, 'N' );
static Ki_HotkeyInfo HkRotateComponent( wxT( "Rotate Component" ), HK_ROTATE_COMPONENT, 'R' ); static Ki_HotkeyInfo HkRotateComponent( wxT( "Rotate Component" ), HK_ROTATE_COMPONENT, 'R' );
static Ki_HotkeyInfo HkMoveComponent( wxT( "Move Component" ), HK_MOVE_COMPONENT, 'M' ); static Ki_HotkeyInfo HkMoveComponent( wxT( "Move Component" ), HK_MOVE_COMPONENT, 'M', ID_POPUP_SCH_MOVE_CMP_REQUEST );
static Ki_HotkeyInfo HkDragComponent( wxT( "Drag Component" ), HK_DRAG_COMPONENT, 'G', ID_POPUP_SCH_DRAG_CMP_REQUEST );
static Ki_HotkeyInfo HkMove2Drag( wxT( static Ki_HotkeyInfo HkMove2Drag( wxT(
"Switch move block to drag block" ), "Switch move block to drag block" ),
HK_MOVEBLOCK_TO_DRAGBLOCK, '\t' ); HK_MOVEBLOCK_TO_DRAGBLOCK, '\t' );
@ -80,7 +81,7 @@ Ki_HotkeyInfo* s_Common_Hotkey_List[] =
&HkHelp, &HkHelp,
&HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter, &HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter,
&HkResetLocalCoord, &HkResetLocalCoord,
&HkUndo, &HkRedo, &HkUndo, &HkRedo,
NULL NULL
}; };
@ -88,7 +89,7 @@ Ki_HotkeyInfo* s_Common_Hotkey_List[] =
Ki_HotkeyInfo* s_Schematic_Hotkey_List[] = { Ki_HotkeyInfo* s_Schematic_Hotkey_List[] = {
&HkNextSearch, &HkNextSearch,
&HkDelete, &HkInsert, &HkMove2Drag, &HkDelete, &HkInsert, &HkMove2Drag,
&HkMoveComponent, &HkAddComponent, &HkMoveComponent, &HkDragComponent, &HkAddComponent,
&HkRotateComponent, &HkMirrorXComponent, &HkMirrorYComponent, &HkOrientNormalComponent, &HkRotateComponent, &HkMirrorXComponent, &HkMirrorYComponent, &HkOrientNormalComponent,
&HkBeginWire, &HkBeginWire,
NULL NULL
@ -135,7 +136,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
* Commands are case insensitive * Commands are case insensitive
*/ */
{ {
bool PopupOn = m_CurrentScreen->GetCurItem() bool ItemInEdit = m_CurrentScreen->GetCurItem()
&& m_CurrentScreen->GetCurItem()->m_Flags; && m_CurrentScreen->GetCurItem()->m_Flags;
bool RefreshToolBar = FALSE; // We must refresh tool bar when the undo/redo tool state is modified bool RefreshToolBar = FALSE; // We must refresh tool bar when the undo/redo tool state is modified
@ -152,11 +153,12 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
hotkey += 'A' - 'a'; hotkey += 'A' - 'a';
// Search command from key : // Search command from key :
int CommandCode = GetCommandCodeFromHotkey( hotkey, s_Common_Hotkey_List ); Ki_HotkeyInfo * HK_Descr = GetDescriptorFromHotkey( hotkey, s_Common_Hotkey_List );
if( CommandCode == HK_NOT_FOUND ) if( HK_Descr == NULL )
CommandCode = GetCommandCodeFromHotkey( hotkey, s_Schematic_Hotkey_List ); HK_Descr = GetDescriptorFromHotkey( hotkey, s_Schematic_Hotkey_List );
if( HK_Descr == NULL ) return;
switch( CommandCode ) switch( HK_Descr->m_Idcommand )
{ {
default: default:
case HK_NOT_FOUND: case HK_NOT_FOUND:
@ -188,25 +190,22 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break; break;
case HK_UNDO: case HK_UNDO:
{
wxCommandEvent event(wxEVT_COMMAND_TOOL_CLICKED, ID_SCHEMATIC_UNDO);
wxPostEvent(this, event);
}
break;
case HK_REDO: case HK_REDO:
{ if( ItemInEdit )
wxCommandEvent event(wxEVT_COMMAND_TOOL_CLICKED, ID_SCHEMATIC_REDO); break;
wxPostEvent(this, event); {
} wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED, HK_Descr->m_IdMenuEvent );
break;
wxPostEvent( this, event );
}
break;
case HK_MOVEBLOCK_TO_DRAGBLOCK: // Switch to drag mode, when block moving case HK_MOVEBLOCK_TO_DRAGBLOCK: // Switch to drag mode, when block moving
HandleBlockEndByPopUp( BLOCK_DRAG, DC ); HandleBlockEndByPopUp( BLOCK_DRAG, DC );
break; break;
case HK_DELETE: case HK_DELETE:
if( PopupOn ) if( ItemInEdit )
break; break;
RefreshToolBar = LocateAndDeleteItem( this, DC ); RefreshToolBar = LocateAndDeleteItem( this, DC );
m_CurrentScreen->SetModify(); m_CurrentScreen->SetModify();
@ -215,23 +214,25 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break; break;
case HK_REPEAT_LAST: case HK_REPEAT_LAST:
if( ItemInEdit )
break;
if( g_ItemToRepeat && (g_ItemToRepeat->m_Flags == 0) ) if( g_ItemToRepeat && (g_ItemToRepeat->m_Flags == 0) )
{ {
RepeatDrawItem( DC ); RepeatDrawItem( DC );
} }
else
wxBell();
break; break;
case HK_NEXT_SEARCH: case HK_NEXT_SEARCH:
if( g_LastSearchIsMarker ) if( ItemInEdit )
break;
if( g_LastSearchIsMarker )
WinEDA_SchematicFrame::FindMarker( 1 ); WinEDA_SchematicFrame::FindMarker( 1 );
else else
FindSchematicItem( wxEmptyString, 2 ); FindSchematicItem( wxEmptyString, 2 );
break; break;
case HK_ADD_NEW_COMPONENT: // Add component case HK_ADD_NEW_COMPONENT: // Add component
if( DrawStruct && DrawStruct->m_Flags ) if( ItemInEdit )
break; break;
// switch to m_ID_current_state = ID_COMPONENT_BUTT; // switch to m_ID_current_state = ID_COMPONENT_BUTT;
@ -351,15 +352,18 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
} }
break; break;
case HK_MOVE_COMPONENT: // Start move Component case HK_DRAG_COMPONENT: // Start drag Component
if( PopupOn ) case HK_MOVE_COMPONENT: // Start move Component
if( ItemInEdit )
break; break;
if( DrawStruct == NULL ) if( DrawStruct == NULL )
DrawStruct = LocateSmallestComponent( GetScreen() ); DrawStruct = LocateSmallestComponent( GetScreen() );
if( DrawStruct && (DrawStruct->m_Flags ==0) ) if( DrawStruct && (DrawStruct->m_Flags ==0) )
{ {
m_CurrentScreen->SetCurItem( DrawStruct ); m_CurrentScreen->SetCurItem( DrawStruct );
Process_Move_Item( m_CurrentScreen->GetCurItem(), DC ); wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED, HK_Descr->m_IdMenuEvent );
wxPostEvent( this, event );
} }
break; break;
} }
@ -378,6 +382,8 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
* Commands are case insensitive * Commands are case insensitive
*/ */
{ {
bool ItemInEdit = m_CurrentScreen->GetCurItem()
&& m_CurrentScreen->GetCurItem()->m_Flags;
bool RefreshToolBar = FALSE; // We must refresh tool bar when the undo/redo tool state is modified bool RefreshToolBar = FALSE; // We must refresh tool bar when the undo/redo tool state is modified
if( hotkey == 0 ) if( hotkey == 0 )
@ -391,11 +397,12 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
/* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */ /* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */
if( (hotkey >= 'a') && (hotkey <= 'z') ) if( (hotkey >= 'a') && (hotkey <= 'z') )
hotkey += 'A' - 'a'; hotkey += 'A' - 'a';
int CommandCode = GetCommandCodeFromHotkey( hotkey, s_Common_Hotkey_List ); Ki_HotkeyInfo * HK_Descr = GetDescriptorFromHotkey( hotkey, s_Common_Hotkey_List );
if( CommandCode == HK_NOT_FOUND ) if( HK_Descr == NULL )
CommandCode = GetCommandCodeFromHotkey( hotkey, s_LibEdit_Hotkey_List ); HK_Descr = GetDescriptorFromHotkey( hotkey, s_LibEdit_Hotkey_List );
if( HK_Descr == NULL ) return;
switch( CommandCode ) switch( HK_Descr->m_Idcommand )
{ {
default: default:
case HK_NOT_FOUND: case HK_NOT_FOUND:
@ -426,19 +433,16 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
OnZoom( ID_ZOOM_CENTER_KEY ); OnZoom( ID_ZOOM_CENTER_KEY );
break; break;
case HK_UNDO: case HK_UNDO:
{ case HK_REDO:
wxCommandEvent event(wxEVT_COMMAND_TOOL_CLICKED, ID_LIBEDIT_UNDO); if( ItemInEdit )
wxPostEvent(this, event); break;
} {
break; wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED, HK_Descr->m_IdMenuEvent );
case HK_REDO: wxPostEvent( this, event );
{ }
wxCommandEvent event(wxEVT_COMMAND_TOOL_CLICKED, ID_LIBEDIT_REDO); break;
wxPostEvent(this, event);
}
break;
case HK_REPEAT_LAST: case HK_REPEAT_LAST:
if( LibItemToRepeat && (LibItemToRepeat->m_Flags == 0) if( LibItemToRepeat && (LibItemToRepeat->m_Flags == 0)

View File

@ -25,6 +25,7 @@ enum hotkey_id_commnand {
HK_MIRROR_Y_COMPONENT, HK_MIRROR_Y_COMPONENT,
HK_ORIENT_NORMAL_COMPONENT, HK_ORIENT_NORMAL_COMPONENT,
HK_MOVE_COMPONENT, HK_MOVE_COMPONENT,
HK_DRAG_COMPONENT,
HK_ADD_NEW_COMPONENT, HK_ADD_NEW_COMPONENT,
HK_BEGIN_WIRE HK_BEGIN_WIRE
}; };

View File

@ -284,6 +284,9 @@ void AddMenusForComponent( wxMenu* PopMenu, EDA_SchComponentStruct* Component )
msg = AddHotkeyName( _( "Move Component" ), s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT ); msg = AddHotkeyName( _( "Move Component" ), s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_CMP_REQUEST, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_CMP_REQUEST,
msg, move_xpm ); msg, move_xpm );
msg = AddHotkeyName( _( "Drag Component" ), s_Schematic_Hokeys_Descr, HK_DRAG_COMPONENT );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DRAG_CMP_REQUEST,
msg, move_xpm );
} }
// add menu orient et sous menu: // add menu orient et sous menu:

View File

@ -53,6 +53,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_MOVE_PINSHEET: case ID_POPUP_SCH_MOVE_PINSHEET:
case ID_POPUP_SCH_MOVE_ITEM_REQUEST: case ID_POPUP_SCH_MOVE_ITEM_REQUEST:
case ID_POPUP_SCH_MOVE_CMP_REQUEST: case ID_POPUP_SCH_MOVE_CMP_REQUEST:
case ID_POPUP_SCH_DRAG_CMP_REQUEST:
case ID_POPUP_SCH_EDIT_CMP: case ID_POPUP_SCH_EDIT_CMP:
case ID_POPUP_SCH_MIROR_X_CMP: case ID_POPUP_SCH_MIROR_X_CMP:
case ID_POPUP_SCH_MIROR_Y_CMP: case ID_POPUP_SCH_MIROR_Y_CMP:
@ -486,21 +487,27 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
m_CurrentScreen->GetCurItem(), &dc ); m_CurrentScreen->GetCurItem(), &dc );
break; break;
case ID_POPUP_SCH_DRAG_CMP_REQUEST:
case ID_POPUP_SCH_MOVE_CMP_REQUEST: case ID_POPUP_SCH_MOVE_CMP_REQUEST:
// Ensure the struct is a component (could be a struct of a component, like Field, text..) // Ensure the struct is a component (could be a struct of a component, like Field, text..)
if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) ); m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) );
if( m_CurrentScreen->GetCurItem() == NULL ) if( m_CurrentScreen->GetCurItem() == NULL )
break; break;
case ID_POPUP_SCH_MOVE_ITEM_REQUEST: case ID_POPUP_SCH_MOVE_ITEM_REQUEST:
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
Process_Move_Item( m_CurrentScreen->GetCurItem(), &dc ); if ( id == ID_POPUP_SCH_DRAG_CMP_REQUEST )
{ // The easiest way to handle a drag component is simulate a block drag command
if( GetScreen()->BlockLocate.m_State == STATE_NO_BLOCK )
{
if( !HandleBlockBegin( &dc, BLOCK_DRAG, GetScreen()->m_Curseur ) ) break;
HandleBlockEnd( &dc );
}
}
else Process_Move_Item( m_CurrentScreen->GetCurItem(), &dc );
break; break;
case ID_POPUP_SCH_EDIT_CMP: case ID_POPUP_SCH_EDIT_CMP:
// Ensure the struct is a component (could be a struct of a component, like Field, text..) // Ensure the struct is a component (could be a struct of a component, like Field, text..)
if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) ); m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) );

View File

@ -91,9 +91,10 @@ void WinEDA_GerberFrame::OnHotKey( wxDC* DC, int hotkey,
if( (hotkey >= 'a') && (hotkey <= 'z') ) if( (hotkey >= 'a') && (hotkey <= 'z') )
hotkey += 'A' - 'a'; hotkey += 'A' - 'a';
int CommandCode = GetCommandCodeFromHotkey( hotkey, s_Gerbview_Hotkey_List ); Ki_HotkeyInfo * HK_Descr = GetDescriptorFromHotkey( hotkey, s_Gerbview_Hotkey_List );
if( HK_Descr == NULL ) return;
switch( CommandCode ) switch( HK_Descr->m_Idcommand )
{ {
default: default:
case HK_NOT_FOUND: case HK_NOT_FOUND:

View File

@ -5,7 +5,7 @@
COMMON_GLOBL wxString g_BuildVersion COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE #ifdef EDA_BASE
(wxT("(2007-09-19)")) (wxT("(2007-09-22)"))
#endif #endif
; ;

View File

@ -15,11 +15,11 @@
#define DEFAULT_HOTKEY_FILENAME_EXT wxT( ".key" ) #define DEFAULT_HOTKEY_FILENAME_EXT wxT( ".key" )
/* define default path for config key file */ /* define default path for config key file */
#define DEFAULT_HOTKEY_FILENAME_PATH_IS_HOME wxGetHomeDir() + wxT( "/" ) #define DEFAULT_HOTKEY_FILENAME_PATH_IS_HOME wxGetHomeDir() + wxT( "/" )
#define DEFAULT_HOTKEY_FILENAME_PATH_IS_KICAD EDA_Appl->m_BinDir + wxT( "../template/" ) #define DEFAULT_HOTKEY_FILENAME_PATH_IS_KICAD EDA_Appl->m_BinDir + wxT( "../template/" )
/* keyword idetifier in kicad config use ti store/retrieve path option */ /* keyword idetifier in kicad config use ti store/retrieve path option */
#define HOTKEY_CFG_PATH_OPT wxT("HotkeyPathOption") #define HOTKEY_CFG_PATH_OPT wxT( "HotkeyPathOption" )
/* Class to handle hotkey commnands. hotkeys have a default value /* Class to handle hotkey commnands. hotkeys have a default value
@ -31,9 +31,10 @@ public:
int m_KeyCode; // Key code (ascii value for ascii keys or wxWidgets code for function key int m_KeyCode; // Key code (ascii value for ascii keys or wxWidgets code for function key
wxString m_InfoMsg; // info message. wxString m_InfoMsg; // info message.
int m_Idcommand; // internal id for the corresponding command (see hotkey_id_commnand list) int m_Idcommand; // internal id for the corresponding command (see hotkey_id_commnand list)
int m_IdMenuEvent; // id to call the corresponding event (if any) (see id.h)
public: public:
Ki_HotkeyInfo( const wxChar* infomsg, int idcommand, int keycode ); Ki_HotkeyInfo( const wxChar* infomsg, int idcommand, int keycode, int idmenuevent = 0 );
}; };
/* handle a Section name and the corresponding list of hotkeys (Ki_HotkeyInfo list) /* handle a Section name and the corresponding list of hotkeys (Ki_HotkeyInfo list)
@ -84,24 +85,24 @@ COMMON_GLOBL wxString g_ModuleEditSectionTag
; ;
COMMON_GLOBL int g_ConfigFileLocationChoice; /* 0 = files are in Home directory (usefull under unix) COMMON_GLOBL int g_ConfigFileLocationChoice; /* 0 = files are in Home directory (usefull under unix)
* 1 = kicad/template ( usefull only under windows ) * 1 = kicad/template ( usefull only under windows )
* 2 ... = unused * 2 ... = unused
*/ */
/* Functions: /* Functions:
*/ */
wxString ReturnHotkeyConfigFilePath( int choice ); wxString ReturnHotkeyConfigFilePath( int choice );
void AddHotkeyConfigMenu( wxMenu* menu ); void AddHotkeyConfigMenu( wxMenu* menu );
void HandleHotkeyConfigMenuSelection( WinEDA_DrawFrame * frame, int id ); void HandleHotkeyConfigMenuSelection( WinEDA_DrawFrame* frame, int id );
wxString ReturnKeyNameFromKeyCode( int keycode ); wxString ReturnKeyNameFromKeyCode( int keycode );
wxString ReturnKeyNameFromCommandId( Ki_HotkeyInfo** List, int CommandId ); wxString ReturnKeyNameFromCommandId( Ki_HotkeyInfo** List, int CommandId );
wxString AddHotkeyName( const wxString& text, Ki_HotkeyInfo** List, int CommandId ); wxString AddHotkeyName( const wxString& text, Ki_HotkeyInfo** List, int CommandId );
wxString AddHotkeyName( const wxString& text, wxString AddHotkeyName( const wxString& text,
struct Ki_HotkeyInfoSectionDescriptor* DescrList, struct Ki_HotkeyInfoSectionDescriptor* DescrList,
int CommandId ); int CommandId );
void DisplayHotkeyList( WinEDA_DrawFrame* frame, void DisplayHotkeyList( WinEDA_DrawFrame* frame,
struct Ki_HotkeyInfoSectionDescriptor* List ); struct Ki_HotkeyInfoSectionDescriptor* List );
int GetCommandCodeFromHotkey( int key, Ki_HotkeyInfo** List ); Ki_HotkeyInfo* GetDescriptorFromHotkey( int key, Ki_HotkeyInfo** List );
#endif // HOTKEYS_BASIC_H #endif // HOTKEYS_BASIC_H

View File

@ -282,7 +282,7 @@ enum main_id {
ID_POPUP_SCH_DELETE_NODE, ID_POPUP_SCH_DELETE_NODE,
ID_POPUP_SCH_MOVE_CMP_REQUEST, ID_POPUP_SCH_MOVE_CMP_REQUEST,
ID_POPUP_SCH_DELETE_CMP, ID_POPUP_SCH_DELETE_CMP,
ID_POPUP_SCH_UNUSED_0, ID_POPUP_SCH_DRAG_CMP_REQUEST,
ID_POPUP_SCH_UNUSED_1, ID_POPUP_SCH_UNUSED_1,
ID_POPUP_SCH_UNUSED_2, ID_POPUP_SCH_UNUSED_2,
ID_POPUP_SCH_ENTRY_SELECT_SLASH, ID_POPUP_SCH_ENTRY_SELECT_SLASH,

View File

@ -25,9 +25,9 @@ KICAD_TEMPLATE=$(KICAD_DATA)/template
else else
# used by myself (JP Charras) to build a statically linked distribution intalled in /usr/local (with STD_INSTALL = 0) # used by myself (JP Charras) to build a statically linked distribution intalled in /usr/local (with STD_INSTALL = 0)
PREFIX = /usr/local/linux PREFIX = /usr/local/kicad
KICAD_BIN = $(PREFIX)/bin KICAD_BIN = $(PREFIX)/linux
KICAD_PLUGINS = $(PREFIX)/linux/plugins KICAD_PLUGINS = $(KICAD_BIN)/plugins
KICAD_DOCS=$(PREFIX)/help KICAD_DOCS=$(PREFIX)/help
KICAD_DATA=$(PREFIX) KICAD_DATA=$(PREFIX)
KICAD_MODULES=$(KICAD_DATA)/modules KICAD_MODULES=$(KICAD_DATA)/modules
@ -121,12 +121,15 @@ ifeq ($(KICAD_STATIC_LINK), 1)
LIBS3D = $(WXPATH)/$(PREFIX_WX_LIBS)$(SUFFIX_WX_LIBGL)\ LIBS3D = $(WXPATH)/$(PREFIX_WX_LIBS)$(SUFFIX_WX_LIBGL)\
$(MESALIBSPATH)/libGL.a $(MESALIBSPATH)/libGLU.a $(MESALIBSPATH)/libGL.a $(MESALIBSPATH)/libGLU.a
AUXLIB = -lXxf86vm
#AUXLIB = /usr/X11R6/lib/libXinerama.a
WXSYSLIB= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \ WXSYSLIB= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \
$(WXPATH)/libwxpng-$(LIBVERSION).a\ $(WXPATH)/libwxpng-$(LIBVERSION).a\
$(WXPATH)/libwxjpeg-$(LIBVERSION).a\ $(WXPATH)/libwxjpeg-$(LIBVERSION).a\
$(WXPATH)/libwxzlib-$(LIBVERSION).a\ $(WXPATH)/libwxzlib-$(LIBVERSION).a\
$(LIBREGEX)\ $(LIBREGEX)\
/usr/X11R6/lib/libXinerama.a \ $(AUXLIB)\
-lgtk-x11-2.0 -lgdk-x11-2.0 \ -lgtk-x11-2.0 -lgdk-x11-2.0 \
-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lgthread-2.0\ -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lgthread-2.0\
-lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl\ -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl\
@ -134,18 +137,8 @@ WXSYSLIB= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \
-L/usr/lib $(PYLIBS) -L/usr/lib $(PYLIBS)
WXSYSLIB_WITH_GL= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \ WXSYSLIB_WITH_GL= $(WXSYSLIB) $(LIBS3D)
$(WXPATH)/libwxpng-$(LIBVERSION).a\
$(WXPATH)/libwxjpeg-$(LIBVERSION).a\
$(WXPATH)/libwxzlib-$(LIBVERSION).a\
$(LIBS3D)\
/usr/X11R6/lib/libXinerama.a \
/usr/X11R6/lib/libXxf86vm.a \
-lgtk-x11-2.0 -lgdk-x11-2.0 \
-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lgthread-2.0\
-lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl\
-lglib-2.0 -lpangoft2-1.0 -lSM\
-L/usr/lib $(PYLIBS)
else else
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)

View File

@ -186,12 +186,14 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey,
if( (hotkey >= 'a') && (hotkey <= 'z') ) if( (hotkey >= 'a') && (hotkey <= 'z') )
hotkey += 'A' - 'a'; hotkey += 'A' - 'a';
int CommandCode = GetCommandCodeFromHotkey( hotkey, s_Common_Hotkey_List ); Ki_HotkeyInfo * HK_Descr = GetDescriptorFromHotkey( hotkey, s_Common_Hotkey_List );
if( CommandCode == HK_NOT_FOUND ) if( HK_Descr == NULL )
CommandCode = GetCommandCodeFromHotkey( hotkey, s_board_edit_Hotkey_List ); HK_Descr = GetDescriptorFromHotkey( hotkey, s_board_edit_Hotkey_List );
if( HK_Descr == NULL ) return;
int ll; int ll;
switch( CommandCode ) switch( HK_Descr->m_Idcommand )
{ {
default: default:
case HK_NOT_FOUND: case HK_NOT_FOUND:
@ -465,7 +467,7 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey,
SetCurItem( module ); SetCurItem( module );
} }
switch( CommandCode ) switch( HK_Descr->m_Idcommand )
{ {
case HK_ROTATE_FOOTPRINT: // Rotation case HK_ROTATE_FOOTPRINT: // Rotation
Rotate_Module( DC, module, 900, TRUE ); Rotate_Module( DC, module, 900, TRUE );
@ -506,11 +508,12 @@ void WinEDA_ModuleEditFrame::OnHotKey( wxDC* DC, int hotkey,
if( (hotkey >= 'a') && (hotkey <= 'z') ) if( (hotkey >= 'a') && (hotkey <= 'z') )
hotkey += 'A' - 'a'; hotkey += 'A' - 'a';
int CommandCode = GetCommandCodeFromHotkey( hotkey, s_Common_Hotkey_List ); Ki_HotkeyInfo * HK_Descr = GetDescriptorFromHotkey( hotkey, s_Common_Hotkey_List );
if( CommandCode == HK_NOT_FOUND ) if( HK_Descr == NULL )
CommandCode = GetCommandCodeFromHotkey( hotkey, s_module_edit_Hotkey_List ); HK_Descr = GetDescriptorFromHotkey( hotkey, s_module_edit_Hotkey_List );
if( HK_Descr == NULL ) return;
switch( CommandCode ) switch( HK_Descr->m_Idcommand )
{ {
default: default:
case HK_NOT_FOUND: case HK_NOT_FOUND: