Commit 2e29b4f1 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

* Add PCB_EDIT_FRAME::syncLayerVisibilities(), PCB_LAYER_MANAGER::SyncLayerVisibilities().

  * Save all visibilities, layer and render, in BOARD and restore on load.
parent 3976d508
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -4,6 +4,13 @@ KiCad ChangeLog 2012
Please add newer entries at the top, list the date and your name with
email address.

2012-Mar-11 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++pcbnew
  * Add PCB_EDIT_FRAME::syncLayerVisibilities, PCB_LAYER_MANAGER::SyncLayerVisibilities().
  * Save all visibilities, layer and render, in BOARD and restore on load.


2012-Feb-19 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++pcbnew
+7 −7
Original line number Diff line number Diff line
@@ -265,7 +265,7 @@ wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, int aInternal_Uni

    value_to_print = To_User_Unit( aUnit, aValue, aInternal_Unit );

    /* Yet another 'if Pcbnew' :( */
    // Yet another 'if Pcbnew' :(
    StringValue.Printf( ( aInternal_Unit > 1000 ) ? wxT( "%.4f" ) : wxT( "%.3f" ),
                        value_to_print );

@@ -293,12 +293,12 @@ int ReturnValueFromString( EDA_UNITS_T aUnit, const wxString& TextValue, int Int
    int    Value;
    double dtmp = 0;

    /* Acquire the 'right' decimal point separator */
    // Acquire the 'right' decimal point separator
    const struct lconv* lc = localeconv();
    wxChar decimal_point = lc->decimal_point[0];
    wxString            buf( TextValue.Strip( wxString::both ) );

    /* Convert the period in decimal point */
    // Convert the period in decimal point
    buf.Replace( wxT( "." ), wxString( decimal_point, 1 ) );

    // An ugly fix needed by WxWidgets 2.9.1 that sometimes
@@ -306,7 +306,7 @@ int ReturnValueFromString( EDA_UNITS_T aUnit, const wxString& TextValue, int Int
    // TODO: remove this line if WxWidgets 2.9.2 fixes this issue
    buf.Replace( wxT( "," ), wxString( decimal_point, 1 ) );

    /* Find the end of the numeric part */
    // Find the end of the numeric part
    unsigned brk_point = 0;

    while( brk_point < buf.Len() )
@@ -321,10 +321,10 @@ int ReturnValueFromString( EDA_UNITS_T aUnit, const wxString& TextValue, int Int
        ++brk_point;
    }

    /* Extract the numeric part */
    // Extract the numeric part
    buf.Left( brk_point ).ToDouble( &dtmp );

    /* Check the optional unit designator (2 ch significant) */
    // Check the optional unit designator (2 ch significant)
    wxString unit( buf.Mid( brk_point ).Strip( wxString::leading ).Left( 2 ).Lower() );

    if( unit == wxT( "in" ) || unit == wxT( "\"" ) )
@@ -335,7 +335,7 @@ int ReturnValueFromString( EDA_UNITS_T aUnit, const wxString& TextValue, int Int
    {
        aUnit = MILLIMETRES;
    }
    else if( unit == wxT( "mi" ) || unit == wxT( "th" ) ) /* Mils or thous */
    else if( unit == wxT( "mi" ) || unit == wxT( "th" ) ) // Mils or thous
    {
        aUnit = INCHES;
        dtmp /= 1000;
+1 −0
Original line number Diff line number Diff line
@@ -207,6 +207,7 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
    info.AddDeveloper( new Contributor( wxT( "Jean-Pierre Charras" ),
                                        wxT( "jean-pierre.charras@gipsa-lab.inpg.fr" ) ) );
    info.AddDeveloper( new Contributor( wxT( "Dick Hollenbeck" ), wxT( "dick@softplc.com" ) ) );
    info.AddDeveloper( new Contributor( wxT( "Frank Bennett" ), wxT( "bennett78@lpbroadband.net" ) ) );
    info.AddDeveloper( new Contributor( wxT( "Hauptmech" ), wxT( "hauptmech@gmail.com" ) ) );
    info.AddDeveloper( new Contributor( wxT( "Jerry Jacobs" ),
                                        wxT( "xor.gate.engineering@gmail.com" ) ) );
+4 −6
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ public:

    /**
     * Function IsCustom
     * returns true if the type is "User"
     * returns true if the type is Custom
     */
    bool IsCustom() const;

@@ -196,8 +196,6 @@ public:
    const wxSize GetSizeIU() const  { return wxSize( GetWidthIU(), GetHeightIU() ); }
#endif

//    wxPoint GetOffsetMils() const   { return m_Offset; }

    int GetLeftMarginMils() const           { return m_left_margin; }
    int GetRightMarginMils() const          { return m_right_margin; }
    int GetTopMarginMils() const            { return m_top_margin; }
+8 −2
Original line number Diff line number Diff line
@@ -11,6 +11,8 @@
#include <boost/ptr_container/ptr_vector.hpp>




/** Type of parameter in the configuration file */
enum paramcfg_id {
    PARAM_INT,
@@ -31,11 +33,15 @@ enum paramcfg_id {
#define INT_MAXVAL 0x7FFFFFFF



/**
 * Class PARAM_CFG_BASE
 * is a base class which establishes the virtual functions ReadParam and SaveParam,
 * which are re-implemented by a number of base classes, and these function's
 * is a base class which establishes the interface functions ReadParam and SaveParam,
 * which are implemented by a number of derived classes, and these function's
 * doxygen comments are inherited also.
 * <p>
 * See kicad.odt or kicad.pdf, chapter 2 :
 * "Installation and configuration/Initialization of the default config".
 */
class PARAM_CFG_BASE
{
Loading