Commit cbaf4f9f authored by dickelbeck's avatar dickelbeck
Browse files

hotkey fix for + and -

parent eb9e1f77
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -466,7 +466,9 @@ INPUT = kicad \
                         common \
                         common \
                         gerbview \
                         gerbview \
                         share \
                         share \
                         include
                         include \
                         polygon
                         


# If the value of the INPUT tag contains directories, you can use the 
# If the value of the INPUT tag contains directories, you can use the 
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+18 −9
Original line number Original line Diff line number Diff line
@@ -4,6 +4,16 @@ 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-Dec-11 UPDATE   Dick Hollenbeck <dick@softplc.com>
================================================================================
+all
  * Fixed hotkey table for '+' and '-' bug.  The lookup table in 
    common/hotkeys_basic.cpp had bad entries for + and -.  These hotkeys
    were not working on Linux.
  * Added polygon directory to Doxyfile.


2007-Dec-09 UPDATE  Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
2007-Dec-09 UPDATE  Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
================================================================================
+cvpcb:
+cvpcb:
@@ -24,7 +34,6 @@ email address.
    Very minor bug in drill map : inaccurate via shapes (I believe EXCELLON drill file has no problems)
    Very minor bug in drill map : inaccurate via shapes (I believe EXCELLON drill file has no problems)


    
    
    
2007-Dec-06 UPDATE  Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
2007-Dec-06 UPDATE  Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
================================================================================
+all
+all
+8 −2
Original line number Original line Diff line number Diff line
@@ -61,8 +61,8 @@ static struct hotkey_name_descr s_Hotkey_Name_List[] =
    { 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( "+" ),         '+'              },
    { wxT( "-" ),         WXK_SUBTRACT     },
    { wxT( "-" ),         '-'              },


    { wxT( "Up" ),        WXK_UP           },
    { wxT( "Up" ),        WXK_UP           },
    { wxT( "Down" ),      WXK_DOWN         },
    { wxT( "Down" ),      WXK_DOWN         },
@@ -273,6 +273,7 @@ static int ReturnKeyCodeFromKeyName( const wxString& keyname )
    {
    {
        if( s_Hotkey_Name_List[ii].m_KeyCode == 0 )  // End of list reached
        if( s_Hotkey_Name_List[ii].m_KeyCode == 0 )  // End of list reached
            break;
            break;
        
        if( keyname.CmpNoCase( s_Hotkey_Name_List[ii].m_Name ) == 0 )
        if( keyname.CmpNoCase( s_Hotkey_Name_List[ii].m_Name ) == 0 )
        {
        {
            keycode = s_Hotkey_Name_List[ii].m_KeyCode;
            keycode = s_Hotkey_Name_List[ii].m_KeyCode;
@@ -542,10 +543,13 @@ int WinEDA_BasicFrame::ReadHotkeyConfigFile( const wxString&
        /* Get the key name */
        /* Get the key name */
        strtok( NULL, "\"\n\r" );
        strtok( NULL, "\"\n\r" );
        keyname = strtok( NULL, "\"\n\r" );
        keyname = strtok( NULL, "\"\n\r" );
        
        strtok( NULL, "\"\n\r" );
        strtok( NULL, "\"\n\r" );
        
        /* Get the command name */
        /* Get the command name */
        fctname = strtok( NULL, "\"\n\r" );
        fctname = strtok( NULL, "\"\n\r" );
        msg = CONV_FROM_UTF8( fctname );
        msg = CONV_FROM_UTF8( fctname );
        
        /* search the hotkey in current hotkey list */
        /* search the hotkey in current hotkey list */
        for( Ki_HotkeyInfo** List = CurrentHotkeyList; *List != NULL; List++ )
        for( Ki_HotkeyInfo** List = CurrentHotkeyList; *List != NULL; List++ )
        {
        {
@@ -553,9 +557,11 @@ int WinEDA_BasicFrame::ReadHotkeyConfigFile( const wxString&
            if( hk_decr->m_InfoMsg == msg )
            if( hk_decr->m_InfoMsg == msg )
            {
            {
                msg = CONV_FROM_UTF8( keyname );
                msg = CONV_FROM_UTF8( keyname );
                
                int code = ReturnKeyCodeFromKeyName( msg );
                int code = ReturnKeyCodeFromKeyName( msg );
                if( code )
                if( code )
                    hk_decr->m_KeyCode = code;
                    hk_decr->m_KeyCode = code;
                
                break;
                break;
            }
            }
        }
        }
+4 −1
Original line number Original line Diff line number Diff line
@@ -187,9 +187,12 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey,
        hotkey += 'A' - 'a';
        hotkey += 'A' - 'a';


    Ki_HotkeyInfo * HK_Descr = GetDescriptorFromHotkey( hotkey, s_Common_Hotkey_List );
    Ki_HotkeyInfo * HK_Descr = GetDescriptorFromHotkey( hotkey, s_Common_Hotkey_List );
    
    if( HK_Descr == NULL )
    if( HK_Descr == NULL )
        HK_Descr = GetDescriptorFromHotkey( hotkey, s_board_edit_Hotkey_List );
        HK_Descr = GetDescriptorFromHotkey( hotkey, s_board_edit_Hotkey_List );
    if( HK_Descr == NULL ) return;
    
    if( HK_Descr == NULL ) 
        return;


    int ll;
    int ll;


+1 −1
Original line number Original line Diff line number Diff line
@@ -620,7 +620,7 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent )
        if( parent == NULL )
        if( parent == NULL )
            return NULL;
            return NULL;
        m_SelLayerBox = new WinEDAChoiceBox( parent, ID_TOOLBARH_PCB_SELECT_LAYER,
        m_SelLayerBox = new WinEDAChoiceBox( parent, ID_TOOLBARH_PCB_SELECT_LAYER,
                                            wxPoint( -1, -1 ), wxSize( LISTBOX_WIDTH, -1 ) );
                                            wxPoint( -1, -1 ), wxSize( -1, -1 ) );
        parent->AddControl( m_SelLayerBox );
        parent->AddControl( m_SelLayerBox );
    }
    }