Commit 57b30ad2 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Pcbnew: Fix Bug #1185556. fix issue about Solder Paste Ratio value which was...

Pcbnew: Fix Bug #1185556. fix issue about Solder Paste Ratio value which was accepting only one digit in mantissa in 3  dialogs  (now 6 digits in all dialogs).
fix potential issue in .kicad_pcb file creation, in some places where a %g or %.16g format was used:
al least under Mingw/gcc4.7.2, the floating number was written using scientific notation, not accepted by the S-expr reader.
parent 5e8c38d2
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -48,22 +48,20 @@
 *       application class.
 */

wxString       g_ProductName    = wxT( "KiCad E.D.A.  " );
bool           g_ShowPageLimits = true;
wxString       g_UserLibDirBuffer;

EDA_UNITS_T    g_UserUnit;
EDA_COLOR_T    g_GhostColor;

#if defined(KICAD_GOST)
static const bool s_gost = true;
#else
static const bool s_gost = false;
#endif

bool IsGOST()
{
    return s_gost;
#if defined(KICAD_GOST)
    return true;
#else
    return false;
#endif
}


+4 −1
Original line number Diff line number Diff line
@@ -44,6 +44,9 @@

#include <worksheet_shape_builder.h>

static const wxString productName = wxT( "KiCad E.D.A.  " );


void DrawPageLayout( wxDC* aDC, EDA_DRAW_PANEL * aCanvas,
                     const PAGE_INFO& aPageInfo,
                     const wxString &aFullSheetName,
@@ -251,7 +254,7 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
                break;

            case 'K':
                msg += g_ProductName + wxGetApp().GetAppName();
                msg += productName + wxGetApp().GetAppName();
                msg += wxT( " " ) + GetBuildVersion();
                break;

+6 −11
Original line number Diff line number Diff line
/*
 * This program source code file is part of KiCad, a free EDA CAD application.
 *
 * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
 * Copyright (C) 2007-2011 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
 * Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net>
 * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
 * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
 * Copyright (C) 2007-2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
 * Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@verizon.net>
 * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
@@ -447,9 +447,6 @@ private:
    void    setMargins();
};


extern wxString     g_ProductName;

/// Default user lib path can be left void, if the standard lib path is used
extern wxString     g_UserLibDirBuffer;

@@ -461,8 +458,6 @@ extern EDA_UNITS_T g_UserUnit; ///< display units
extern EDA_COLOR_T  g_GhostColor;


// COMMON.CPP

/**
 * Function SetLocaleTo_C_standard
 *  because KiCad is internationalized, switch internalization to "C" standard
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ void DIALOG_MODULE_BOARD_EDITOR::InitBoardProperties()

    // Add solder paste margin ration in per cent
    // for the usual default value 0.0, display -0.0 (or -0,0 in some countries)
    msg.Printf( wxT( "%.1f" ),
    msg.Printf( wxT( "%f" ),
                    m_CurrentModule->GetLocalSolderPasteMarginRatio() * 100.0 );

    if( m_CurrentModule->GetLocalSolderPasteMarginRatio() == 0.0 &&
+1 −1
Original line number Diff line number Diff line
@@ -263,7 +263,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
	m_SolderPasteMarginUnits->Wrap( -1 );
	fgSizerClearances->Add( m_SolderPasteMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
	
	m_staticTextRatio = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder mask ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextRatio = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder paste ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextRatio->Wrap( -1 );
	m_staticTextRatio->SetToolTip( _("This is the local clearance ratio in per cent between pads and the solder paste\nfor this footprint.\nA value of 10 means the clearance value is 10 per cent of the pad size\nThis value can be superseded by a pad local value.\nThe final clearance value is the sum of this value and the clearance value\nA negative value means a smaller mask size than pad size.") );
	
Loading