diff --git a/pcbnew/footprint_wizard.cpp b/pcbnew/footprint_wizard.cpp index 02b379c667..54a31e9ae0 100644 --- a/pcbnew/footprint_wizard.cpp +++ b/pcbnew/footprint_wizard.cpp @@ -244,7 +244,7 @@ void FOOTPRINT_WIZARD_FRAME::ParametersUpdated( wxGridEvent& event ) for( int prm_id = 0; prm_id < count; ++prm_id ) { - wxString value = m_parameterGrid->GetCellValue( prm_id, WIZ_COL_VALUE); + wxString value = m_parameterGrid->GetCellValue( prm_id, WIZ_COL_VALUE ); if( prmValues[prm_id] != value ) { diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index bb2e99bb48..dbe617b8dc 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2012-2015 Miguel Angel Ajo Pelayo * Copyright (C) 2012-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2008-2015 Wayne Stambaugh - * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2004-2017 KiCad Developers, see change_log.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 @@ -384,21 +384,20 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateParameterList() // Set the editor type of the // Boolean parameters can be displayed using a checkbox - if ( units == WIZARD_PARAM_UNITS_BOOL ) + if( units == WIZARD_PARAM_UNITS_BOOL ) { wxGridCellBoolEditor *boolEditor = new wxGridCellBoolEditor; boolEditor->UseStringValues("True","False"); m_parameterGrid->SetCellEditor( i, WIZ_COL_VALUE, boolEditor ); - m_parameterGrid->SetCellRenderer( i, WIZ_COL_VALUE, new wxGridCellBoolRenderer ); } // Parameters that can be selected from a list of multiple options - else if ( units.Contains( "," ) ) // Indicates list of available options + else if( units.Contains( "," ) ) // Indicates list of available options { wxStringTokenizer tokenizer( units, "," ); wxArrayString options; - while ( tokenizer.HasMoreTokens() ) + while( tokenizer.HasMoreTokens() ) { options.Add( tokenizer.GetNextToken() ); } @@ -408,17 +407,17 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateParameterList() units = wxT( "" ); } // Integer parameters - else if ( units == WIZARD_PARAM_UNITS_INTEGER ) + else if( units == WIZARD_PARAM_UNITS_INTEGER ) { m_parameterGrid->SetCellEditor( i, WIZ_COL_VALUE, new wxGridCellNumberEditor ); } // Non-integer numerical parameters - else if ( ( units == WIZARD_PARAM_UNITS_MM ) || - ( units == WIZARD_PARAM_UNITS_MILS ) || - ( units == WIZARD_PARAM_UNITS_FLOAT ) || - ( units == WIZARD_PARAM_UNITS_RADIANS ) || - ( units == WIZARD_PARAM_UNITS_DEGREES ) || - ( units == WIZARD_PARAM_UNITS_PERCENT ) ) + else if( ( units == WIZARD_PARAM_UNITS_MM ) || + ( units == WIZARD_PARAM_UNITS_MILS ) || + ( units == WIZARD_PARAM_UNITS_FLOAT ) || + ( units == WIZARD_PARAM_UNITS_RADIANS ) || + ( units == WIZARD_PARAM_UNITS_DEGREES ) || + ( units == WIZARD_PARAM_UNITS_PERCENT ) ) { m_parameterGrid->SetCellEditor( i, WIZ_COL_VALUE, new wxGridCellFloatEditor ); @@ -427,7 +426,6 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateParameterList() value.Replace( ".", wxNumberFormatter::GetDecimalSeparator() ); } - // Set the 'Units' m_parameterGrid->SetCellValue( i, WIZ_COL_UNITS, units ); m_parameterGrid->SetReadOnly( i, WIZ_COL_UNITS ); @@ -439,14 +437,13 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateParameterList() } ResizeParamColumns(); - } void FOOTPRINT_WIZARD_FRAME::ResizeParamColumns() { // Parameter grid is not yet configured - if ( ( m_parameterGrid == NULL ) || ( m_parameterGrid->GetNumberCols() == 0 ) ) + if( ( m_parameterGrid == NULL ) || ( m_parameterGrid->GetNumberCols() == 0 ) ) return; // first auto-size the columns to ensure enough space around text @@ -458,7 +455,7 @@ void FOOTPRINT_WIZARD_FRAME::ResizeParamColumns() m_parameterGrid->GetColSize( WIZ_COL_NAME ) - m_parameterGrid->GetColSize( WIZ_COL_UNITS ); - if ( width > m_parameterGrid->GetColMinimalAcceptableWidth() ) + if( width > m_parameterGrid->GetColMinimalAcceptableWidth() ) { m_parameterGrid->SetColSize( WIZ_COL_VALUE, width ); } diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 2767f1d336..e67ea6647b 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -271,7 +271,7 @@ static bool scriptingSetup() #endif - if ( !pcbnewInitPythonScripting( TO_UTF8( PyScriptingPath() ) ) ) + if( !pcbnewInitPythonScripting( TO_UTF8( PyScriptingPath() ) ) ) { wxLogError( "pcbnewInitPythonScripting() failed." ); return false; diff --git a/pcbnew/python/plugins/FPC_wizard.py b/pcbnew/python/plugins/FPC_wizard.py index 7f10b0b042..e9bd6d3c12 100644 --- a/pcbnew/python/plugins/FPC_wizard.py +++ b/pcbnew/python/plugins/FPC_wizard.py @@ -127,7 +127,7 @@ class FPC_FootprintWizard(FootprintWizardBase.FootprintWizard): # set SMD attribute self.module.SetAttributes(pcbnew.MOD_CMS) - + # vertical segment at left of the pad xstart = xend yend = posy - (shl_height + linewidth + margin*2) diff --git a/pcbnew/swig/pcbnew_footprint_wizards.cpp b/pcbnew/swig/pcbnew_footprint_wizards.cpp index 3070b7a8df..17444faa11 100644 --- a/pcbnew/swig/pcbnew_footprint_wizards.cpp +++ b/pcbnew/swig/pcbnew_footprint_wizards.cpp @@ -271,26 +271,26 @@ wxArrayString PYTHON_FOOTPRINT_WIZARD::GetParameterErrors( int aPage ) wxArrayString PYTHON_FOOTPRINT_WIZARD::GetParameterHints( int aPage ) { - PyLOCK lock; + PyLOCK lock; - PyObject* arglist = Py_BuildValue( "(i)", aPage ); - wxArrayString ret = CallRetArrayStrMethod( "GetParameterHints", arglist ); + PyObject* arglist = Py_BuildValue( "(i)", aPage ); + wxArrayString ret = CallRetArrayStrMethod( "GetParameterHints", arglist ); - Py_DECREF( arglist ); + Py_DECREF( arglist ); - return ret; + return ret; } wxArrayString PYTHON_FOOTPRINT_WIZARD::GetParameterDesignators( int aPage ) { - PyLOCK lock; + PyLOCK lock; - PyObject* arglist = Py_BuildValue( "(i)", aPage ); - wxArrayString ret = CallRetArrayStrMethod( "GetParameterDesignators", arglist ); + PyObject* arglist = Py_BuildValue( "(i)", aPage ); + wxArrayString ret = CallRetArrayStrMethod( "GetParameterDesignators", arglist ); - Py_DECREF( arglist ); + Py_DECREF( arglist ); - return ret; + return ret; } wxString PYTHON_FOOTPRINT_WIZARD::SetParameterValues( int aPage, wxArrayString& aValues ) @@ -319,9 +319,9 @@ wxString PYTHON_FOOTPRINT_WIZARD::SetParameterValues( int aPage, wxArrayString& void PYTHON_FOOTPRINT_WIZARD::ResetParameters() { - PyLOCK lock; + PyLOCK lock; - CallMethod( "ResetWizard", NULL ); + CallMethod( "ResetWizard", NULL ); } diff --git a/pcbnew/swig/pcbnew_footprint_wizards.h b/pcbnew/swig/pcbnew_footprint_wizards.h index e18eed3155..c679b8659c 100644 --- a/pcbnew/swig/pcbnew_footprint_wizards.h +++ b/pcbnew/swig/pcbnew_footprint_wizards.h @@ -55,14 +55,14 @@ public: wxArrayString GetParameterTypes( int aPage ) override; wxArrayString GetParameterValues( int aPage ) override; wxArrayString GetParameterErrors( int aPage ) override; - // must return an empty string or an error description + // must return an empty string or an error description: wxString SetParameterValues( int aPage, wxArrayString& aValues ) override; MODULE* GetFootprint( wxString * aMessages ) override; void* GetObject() override; wxArrayString GetParameterHints( int aPage ) override; - wxArrayString GetParameterDesignators( int aPage = 0) override; + wxArrayString GetParameterDesignators( int aPage = 0) override; - void ResetParameters() override; + void ResetParameters() override; };