Commit 787cf585 authored by dickelbeck's avatar dickelbeck
Browse files

MenuText() tweaks, beautification

parent f5fd16e2
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -26,10 +26,16 @@ email address.
2007-Oct-10 UPDATE   Dick Hollenbeck <dick@softplc.com>
2007-Oct-10 UPDATE   Dick Hollenbeck <dick@softplc.com>
================================================================================
================================================================================
+ pcbnew
+ pcbnew
  * prevent OnRightClick() from calling PcbGeneralLocateAndDisplay() when creating
  * bug fix: prevent OnRightClick() from calling PcbGeneralLocateAndDisplay() 
    a new track.
    when creating a new track.
  * bug fix: popup menu was not handling Mires, because the collector was not 
  * bug fix: popup menu was not handling Mires, because the collector was not 
    being asked to find them.
    being asked to find them.
  * added TRACK::ShowWidth() and call it from BOARD_ITEM::MenuText().  There was
    not enough information in Selection Clarification at a busy junction to 
    make a reasonable choice.
  * SEGVIA::MenuText() shows via width, rather than net_code.
  * Beautified ratsnets.cpp, I would like to understand it better.  It would help
    if the comments were in English.
+ all
+ all
  * Changed English UI text "Mire" to "Target" according to this post:
  * Changed English UI text "Mire" to "Target" according to this post:
    http://tech.groups.yahoo.com/group/kicad-users/message/1380
    http://tech.groups.yahoo.com/group/kicad-users/message/1380
+2 −4
Original line number Original line Diff line number Diff line
@@ -438,12 +438,10 @@ void valeur_param( int valeur, wxString& buf_texte )
{
{
    if( g_UnitMetric )
    if( g_UnitMetric )
    {
    {
        buf_texte.Printf( wxT( "%3.3f " ), (float) valeur * 0.00254 );
        buf_texte.Printf( wxT( "%3.3f mm" ), valeur * 0.00254 );
        buf_texte << wxT( "mm" );
    }
    }
    else
    else
    {
    {
        buf_texte.Printf( wxT( "%2.4f " ), (float) valeur * 0.0001 );
        buf_texte.Printf( wxT( "%2.4f \"" ), valeur * 0.0001 );
        buf_texte << wxT( "\" " );
    }
    }
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -1369,7 +1369,7 @@ private:


/**
/**
 * Struct MsgItem
 * Struct MsgItem
 * is used privately by WinEDA_MsgPanel as the item type its vector.
 * is used privately by WinEDA_MsgPanel as the item type of its vector.
 * These items are the pairs of text strings shown in the MsgPanel.
 * These items are the pairs of text strings shown in the MsgPanel.
 */
 */
struct MsgItem
struct MsgItem
+3 −3
Original line number Original line Diff line number Diff line
@@ -124,7 +124,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
        break;
        break;


    case TYPETRACK:
    case TYPETRACK:
        text << _( "Track" ) << wxT( " " );
        text << _( "Track" ) << wxT( " " ) << ((TRACK*)item)->ShowWidth();
        net = aPcb->FindNet( ((TRACK*)item)->m_NetCode );
        net = aPcb->FindNet( ((TRACK*)item)->m_NetCode );
        if( net )
        if( net )
        {
        {
@@ -151,7 +151,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
    case TYPEVIA:
    case TYPEVIA:
        {
        {
            SEGVIA* via = (SEGVIA*) item;
            SEGVIA* via = (SEGVIA*) item;
            text << _( "Via" ) << wxT( " " ) << via->m_NetCode;
            text << _( "Via" ) << wxT( " " ) << via->ShowWidth();
            
            
            int shape = via->Shape(); 
            int shape = via->Shape(); 
            if( shape == VIA_ENTERREE )
            if( shape == VIA_ENTERREE )
+20 −0
Original line number Original line Diff line number Diff line
@@ -35,6 +35,26 @@ TRACK::TRACK( BOARD_ITEM* StructFather, KICAD_T idtype ) :
}
}




wxString TRACK::ShowWidth()
{
    wxString msg;
    
#if 0    
    double   value = To_User_Unit( g_UnitMetric, m_Width, PCB_INTERNAL_UNIT );
    
    if( g_UnitMetric == INCHES )  // Affichage en mils
        msg.Printf( wxT( "%.1f" ), value * 1000 );
    else
        msg.Printf( wxT( "%.3f" ), value );
#else

    valeur_param( m_Width, msg );

#endif
    
    return msg;
}



SEGZONE::SEGZONE( BOARD_ITEM* StructFather ) :
SEGZONE::SEGZONE( BOARD_ITEM* StructFather ) :
    TRACK( StructFather, TYPEZONE )
    TRACK( StructFather, TYPEZONE )
Loading