Minor changes: remove a few local shadowed local variables detected using " -Wshadow" gcc compil option ( No bug, just a better code readability ) and fix minor coding style issues.
This commit is contained in:
parent
b846a98199
commit
fde2cfee27
|
@ -402,42 +402,45 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
|
|||
wxT( "Bulgarian (BG)" ),
|
||||
KiBitmapNew( lang_bg_xpm ) ) );
|
||||
|
||||
// TODO: are these all russian translators,
|
||||
// placed them here now,
|
||||
// or else align them below other language maintainer with mail adress
|
||||
// Maintainer who helper in translations, but not in a specific translation
|
||||
#define OTHERS_IN_TRANSLATION _( "Others" )
|
||||
info.AddTranslator( new Contributor( wxT( "Remy Halvick" ),
|
||||
wxEmptyString,
|
||||
wxT( "Others" ) ) );
|
||||
OTHERS_IN_TRANSLATION ) );
|
||||
info.AddTranslator( new Contributor( wxT( "David Briscoe" ),
|
||||
wxEmptyString,
|
||||
wxT( "Others" ) ) );
|
||||
OTHERS_IN_TRANSLATION ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Dominique Laigle" ),
|
||||
wxEmptyString,
|
||||
wxT( "Others" ) ) );
|
||||
OTHERS_IN_TRANSLATION ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Paul Burke" ),
|
||||
wxEmptyString,
|
||||
wxT( "Others" ) ) );
|
||||
OTHERS_IN_TRANSLATION ) );
|
||||
|
||||
// Programm credits for icons
|
||||
#define ICON_CONTRIBUTION _( "Icons by" )
|
||||
info.AddArtist( new Contributor( wxT( "Iñigo Zuluaga" ),
|
||||
wxT( "inigo_zuluaga@yahoo.es" ),
|
||||
wxT( "Icons by" ),
|
||||
ICON_CONTRIBUTION,
|
||||
KiBitmapNew( edit_module_xpm ) ) );
|
||||
info.AddArtist( new Contributor( wxT( "Konstantin Baranovskiy" ),
|
||||
wxT( "baranovskiykonstantin@gmail.com" ),
|
||||
wxT( "New icons by" ),
|
||||
ICON_CONTRIBUTION,
|
||||
KiBitmapNew( edit_module_xpm ) ) );
|
||||
info.AddArtist( new Contributor( wxT( "Fabrizio Tappero" ),
|
||||
wxT( "fabrizio.tappero@gmail.com" ),
|
||||
wxT( "New icons by" ),
|
||||
ICON_CONTRIBUTION,
|
||||
KiBitmapNew( edit_module_xpm ) ) );
|
||||
|
||||
// Programm credits for 3d models
|
||||
#define MODELS_3D_CONTRIBUTION _( "3D models by" )
|
||||
info.AddArtist( new Contributor( wxT( "Christophe Boschat" ),
|
||||
wxT( "nox454@hotmail.fr" ),
|
||||
wxT( "3D models by" ),
|
||||
MODELS_3D_CONTRIBUTION,
|
||||
KiBitmapNew( three_d_xpm ) ) );
|
||||
info.AddArtist( new Contributor( wxT( "Renie Marquet" ),
|
||||
wxT( "reniemarquet@uol.com.br" ),
|
||||
wxT( "3D models by" ),
|
||||
MODELS_3D_CONTRIBUTION,
|
||||
KiBitmapNew( three_d_xpm ) ) );
|
||||
|
||||
// Programm credits for package developers.
|
||||
|
|
|
@ -53,12 +53,12 @@
|
|||
#include "dialog_about.h"
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class dialog_about methods
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Class dialog_about methods
|
||||
*/
|
||||
|
||||
dialog_about::dialog_about(wxWindow *parent, AboutAppInfo& appInfo)
|
||||
: dialog_about_base(parent), info(appInfo)
|
||||
dialog_about::dialog_about(wxWindow *aParent, AboutAppInfo& appInfo)
|
||||
: dialog_about_base(aParent), info(appInfo)
|
||||
{
|
||||
picInformation = KiBitmap( info_xpm );
|
||||
picDevelopers = KiBitmap( preference_xpm );
|
||||
|
@ -83,7 +83,8 @@ dialog_about::dialog_about(wxWindow *parent, AboutAppInfo& appInfo)
|
|||
SetFocus();
|
||||
Centre();
|
||||
|
||||
Connect( wxID_COPY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_about::OnCopyVersionInfo ) );
|
||||
Connect( wxID_COPY, wxEVT_COMMAND_BUTTON_CLICKED,
|
||||
wxCommandEventHandler( dialog_about::OnCopyVersionInfo ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -127,12 +128,12 @@ void dialog_about::CreateNotebooks()
|
|||
CreateNotebookHtmlPage( m_auiNotebook, _( "License" ), picLicense, info.GetLicense() );
|
||||
}
|
||||
|
||||
void dialog_about::CreateNotebookPage( wxAuiNotebook* parent, const wxString& caption,
|
||||
const wxBitmap& icon, const Contributors& contributors )
|
||||
void dialog_about::CreateNotebookPage( wxAuiNotebook* aParent, const wxString& aCaption,
|
||||
const wxBitmap& aIcon, const Contributors& aContributors )
|
||||
{
|
||||
wxBoxSizer* bSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxScrolledWindow* m_scrolledWindow1 = new wxScrolledWindow( parent, wxID_ANY,
|
||||
wxScrolledWindow* m_scrolledWindow1 = new wxScrolledWindow( aParent, wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
wxHSCROLL|wxVSCROLL );
|
||||
|
@ -145,9 +146,9 @@ void dialog_about::CreateNotebookPage( wxAuiNotebook* parent, const wxString& ca
|
|||
|
||||
wxFlexGridSizer* fgSizer1 = CreateFlexGridSizer();
|
||||
|
||||
for( size_t i=0; i<contributors.GetCount(); ++i )
|
||||
for( size_t i=0; i<aContributors.GetCount(); ++i )
|
||||
{
|
||||
Contributor* contributor = &contributors.Item( i );
|
||||
Contributor* contributor = &aContributors.Item( i );
|
||||
|
||||
// Icon at first column
|
||||
wxStaticBitmap* m_bitmap1 = CreateStaticBitmap( m_scrolledWindow1, contributor->GetIcon() );
|
||||
|
@ -185,17 +186,17 @@ void dialog_about::CreateNotebookPage( wxAuiNotebook* parent, const wxString& ca
|
|||
m_scrolledWindow1->SetSizer( bSizer );
|
||||
m_scrolledWindow1->Layout();
|
||||
bSizer->Fit( m_scrolledWindow1 );
|
||||
parent->AddPage( m_scrolledWindow1, caption, false, icon );
|
||||
aParent->AddPage( m_scrolledWindow1, aCaption, false, aIcon );
|
||||
}
|
||||
|
||||
|
||||
void dialog_about::CreateNotebookPageByCategory(wxAuiNotebook* parent, const wxString& caption,
|
||||
const wxBitmap& icon,
|
||||
const Contributors& contributors)
|
||||
void dialog_about::CreateNotebookPageByCategory(wxAuiNotebook* aParent, const wxString& aCaption,
|
||||
const wxBitmap& aIcon,
|
||||
const Contributors& aContributors)
|
||||
{
|
||||
wxBoxSizer* bSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxScrolledWindow* m_scrolledWindow1 = new wxScrolledWindow( parent, wxID_ANY,
|
||||
wxScrolledWindow* m_scrolledWindow1 = new wxScrolledWindow( aParent, wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
wxHSCROLL|wxVSCROLL );
|
||||
|
@ -208,9 +209,9 @@ void dialog_about::CreateNotebookPageByCategory(wxAuiNotebook* parent, const wxS
|
|||
|
||||
wxFlexGridSizer* fgSizer1 = CreateFlexGridSizer();
|
||||
|
||||
for( size_t i=0; i<contributors.GetCount(); ++i )
|
||||
for( size_t i=0; i < aContributors.GetCount(); ++i )
|
||||
{
|
||||
Contributor* contributor = &contributors.Item( i );
|
||||
Contributor* contributor = &aContributors.Item( i );
|
||||
|
||||
wxBitmap* icon = contributor->GetIcon();
|
||||
wxString category = contributor->GetCategory();
|
||||
|
@ -237,28 +238,28 @@ void dialog_about::CreateNotebookPageByCategory(wxAuiNotebook* parent, const wxS
|
|||
fgSizer1->AddSpacer( 5 );
|
||||
|
||||
// Now, all contributors of the same category will follow
|
||||
for( size_t j=0; j<contributors.GetCount(); ++j )
|
||||
for( size_t j=0; j < aContributors.GetCount(); ++j )
|
||||
{
|
||||
Contributor* contributor = &contributors.Item( j );
|
||||
Contributor* sub_contributor = &aContributors.Item( j );
|
||||
|
||||
if ( contributor->GetCategory() == category )
|
||||
if ( sub_contributor->GetCategory() == category )
|
||||
{
|
||||
// First column is empty
|
||||
fgSizer1->AddSpacer(5);
|
||||
|
||||
// Name of contributor at second column
|
||||
wxStaticText* m_staticText2 = new wxStaticText( m_scrolledWindow1, wxID_ANY,
|
||||
wxT(" • ") + contributor->GetName(),
|
||||
wxT(" • ") + sub_contributor->GetName(),
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize, 0 );
|
||||
m_staticText1->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticText2, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
|
||||
|
||||
// Email address of contributor at third column
|
||||
if( contributor->GetEMail() != wxEmptyString )
|
||||
if( sub_contributor->GetEMail() != wxEmptyString )
|
||||
{
|
||||
wxHyperlinkCtrl* hyperlink = CreateHyperlink( m_scrolledWindow1,
|
||||
contributor->GetEMail() );
|
||||
sub_contributor->GetEMail() );
|
||||
fgSizer1->Add( hyperlink, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
|
||||
}
|
||||
else
|
||||
|
@ -269,7 +270,7 @@ void dialog_about::CreateNotebookPageByCategory(wxAuiNotebook* parent, const wxS
|
|||
/* this contributor was added to the GUI,
|
||||
* thus can be ignored next time
|
||||
*/
|
||||
contributor->SetChecked( true );
|
||||
sub_contributor->SetChecked( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -282,9 +283,9 @@ void dialog_about::CreateNotebookPageByCategory(wxAuiNotebook* parent, const wxS
|
|||
/* Now, lets list the remaining contributors that have not been considered
|
||||
* because they were not assigned to any category.
|
||||
*/
|
||||
for ( size_t k=0; k<contributors.GetCount(); ++k )
|
||||
for ( size_t k=0; k < aContributors.GetCount(); ++k )
|
||||
{
|
||||
Contributor* contributor = &contributors.Item( k );
|
||||
Contributor* contributor = &aContributors.Item( k );
|
||||
|
||||
if ( contributor->IsChecked() )
|
||||
continue;
|
||||
|
@ -325,14 +326,14 @@ void dialog_about::CreateNotebookPageByCategory(wxAuiNotebook* parent, const wxS
|
|||
m_scrolledWindow1->SetSizer( bSizer );
|
||||
m_scrolledWindow1->Layout();
|
||||
bSizer->Fit( m_scrolledWindow1 );
|
||||
parent->AddPage( m_scrolledWindow1, caption, false, icon );
|
||||
aParent->AddPage( m_scrolledWindow1, aCaption, false, aIcon );
|
||||
}
|
||||
|
||||
|
||||
void dialog_about::CreateNotebookHtmlPage( wxAuiNotebook* parent, const wxString& caption,
|
||||
const wxBitmap& icon, const wxString& html )
|
||||
void dialog_about::CreateNotebookHtmlPage( wxAuiNotebook* aParent, const wxString& aCaption,
|
||||
const wxBitmap& aIcon, const wxString& html )
|
||||
{
|
||||
wxPanel* panel = new wxPanel( parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
wxPanel* panel = new wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
wxTAB_TRAVERSAL );
|
||||
|
||||
wxBoxSizer* bSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -371,14 +372,14 @@ void dialog_about::CreateNotebookHtmlPage( wxAuiNotebook* parent, const wxString
|
|||
panel->SetSizer( bSizer );
|
||||
panel->Layout();
|
||||
bSizer->Fit( panel );
|
||||
parent->AddPage( panel, caption, false, icon );
|
||||
aParent->AddPage( panel, aCaption, false, aIcon );
|
||||
}
|
||||
|
||||
|
||||
wxHyperlinkCtrl* dialog_about::CreateHyperlink(wxScrolledWindow* parent, const wxString& email)
|
||||
wxHyperlinkCtrl* dialog_about::CreateHyperlink(wxScrolledWindow* aParent, const wxString& email)
|
||||
{
|
||||
wxHyperlinkCtrl* hyperlink = new wxHyperlinkCtrl(
|
||||
parent, wxID_ANY,
|
||||
aParent, wxID_ANY,
|
||||
wxT( "<" ) + email + wxT( ">" ), /* the label */
|
||||
wxT( "mailto:" ) + email
|
||||
+ wxT( "?subject=KiCad - " )
|
||||
|
@ -390,14 +391,14 @@ wxHyperlinkCtrl* dialog_about::CreateHyperlink(wxScrolledWindow* parent, const w
|
|||
}
|
||||
|
||||
|
||||
wxStaticBitmap* dialog_about::CreateStaticBitmap(wxScrolledWindow* parent, wxBitmap* icon)
|
||||
wxStaticBitmap* dialog_about::CreateStaticBitmap(wxScrolledWindow* aParent, wxBitmap* aIcon)
|
||||
{
|
||||
wxStaticBitmap* bitmap = new wxStaticBitmap( parent, wxID_ANY, wxNullBitmap,
|
||||
wxStaticBitmap* bitmap = new wxStaticBitmap( aParent, wxID_ANY, wxNullBitmap,
|
||||
wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
||||
if( icon )
|
||||
if( aIcon )
|
||||
{
|
||||
bitmap->SetBitmap( *icon );
|
||||
bitmap->SetBitmap( *aIcon );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -67,21 +67,21 @@ private:
|
|||
wxFlexGridSizer* CreateFlexGridSizer();
|
||||
void DeleteNotebooks();
|
||||
void CreateNotebooks();
|
||||
void CreateNotebookPage( wxAuiNotebook* parent,
|
||||
const wxString& caption,
|
||||
const wxBitmap& icon,
|
||||
const Contributors& contributors );
|
||||
void CreateNotebookPageByCategory( wxAuiNotebook* parent,
|
||||
const wxString& caption,
|
||||
const wxBitmap& icon,
|
||||
const Contributors& contributors );
|
||||
void CreateNotebookHtmlPage( wxAuiNotebook* parent,
|
||||
const wxString& caption,
|
||||
const wxBitmap& icon,
|
||||
const wxString& html );
|
||||
void CreateNotebookPage( wxAuiNotebook* aParent,
|
||||
const wxString& aCaption,
|
||||
const wxBitmap& aIcon,
|
||||
const Contributors& aContributors );
|
||||
void CreateNotebookPageByCategory( wxAuiNotebook* aParent,
|
||||
const wxString& aCaption,
|
||||
const wxBitmap& aIcon,
|
||||
const Contributors& aContributors );
|
||||
void CreateNotebookHtmlPage( wxAuiNotebook* aParent,
|
||||
const wxString& aCaption,
|
||||
const wxBitmap& aIcon,
|
||||
const wxString& aHtmlMessage );
|
||||
|
||||
wxHyperlinkCtrl* CreateHyperlink( wxScrolledWindow* parent, const wxString& email );
|
||||
wxStaticBitmap* CreateStaticBitmap( wxScrolledWindow* parent, wxBitmap* icon );
|
||||
wxHyperlinkCtrl* CreateHyperlink( wxScrolledWindow* aParent, const wxString& email );
|
||||
wxStaticBitmap* CreateStaticBitmap( wxScrolledWindow* aParent, wxBitmap* icon );
|
||||
};
|
||||
|
||||
#endif // DIALOG_ABOUT_H
|
||||
|
|
|
@ -63,7 +63,6 @@ C_MICROSTRIP::C_MICROSTRIP() : TRANSLINE()
|
|||
er_eff_o = 0.0; // odd-mode effective dielectric constant
|
||||
er_eff_e_0 = 0.0; // static even-mode effective dielectric constant
|
||||
er_eff_o_0 = 0.0; // static odd-mode effective dielectric constant
|
||||
er_eff = 0.0; // dummy
|
||||
w_eff = 0.0; // Effective width of line
|
||||
atten_dielectric_e = 0.0; // even-mode dielectric losses (dB)
|
||||
atten_cond_e = 0.0; // even-mode conductors losses (dB)
|
||||
|
@ -198,14 +197,12 @@ double C_MICROSTRIP::filling_factor_even( double u, double g, double e_r )
|
|||
*/
|
||||
double C_MICROSTRIP::filling_factor_odd( double u, double g, double e_r )
|
||||
{
|
||||
double b_o, c_o, d_o, q_inf;
|
||||
|
||||
b_o = 0.747 * e_r / (0.15 + e_r);
|
||||
c_o = b_o - (b_o - 0.207) * exp( -0.414 * u );
|
||||
d_o = 0.593 + 0.694 * exp( -0.562 * u );
|
||||
double b_odd = 0.747 * e_r / (0.15 + e_r);
|
||||
double c_odd = b_odd - (b_odd - 0.207) * exp( -0.414 * u );
|
||||
double d_odd = 0.593 + 0.694 * exp( -0.562 * u );
|
||||
|
||||
/* filling factor, with width corrected for thickness */
|
||||
q_inf = exp( -c_o * pow( g, d_o ) );
|
||||
double q_inf = exp( -c_odd * pow( g, d_odd ) );
|
||||
|
||||
return q_inf;
|
||||
}
|
||||
|
@ -603,13 +600,14 @@ void C_MICROSTRIP::syn_err_fun( double* f1,
|
|||
double w_h_se,
|
||||
double w_h_so )
|
||||
{
|
||||
double g, h;
|
||||
double g, he;
|
||||
|
||||
g = cosh( 0.5 * M_PI * s_h );
|
||||
h = cosh( M_PI * w_h + 0.5 * M_PI * s_h );
|
||||
he = cosh( M_PI * w_h + 0.5 * M_PI * s_h );
|
||||
|
||||
*f1 = (2.0 / M_PI) * acosh( (2.0 * he - g + 1.0) / (g + 1.0) );
|
||||
*f2 = (2.0 / M_PI) * acosh( (2.0 * he - g - 1.0) / (g - 1.0) );
|
||||
|
||||
*f1 = (2.0 / M_PI) * acosh( (2.0 * h - g + 1.0) / (g + 1.0) );
|
||||
*f2 = (2.0 / M_PI) * acosh( (2.0 * h - g - 1.0) / (g - 1.0) );
|
||||
if( e_r <= 6.0 )
|
||||
{
|
||||
*f2 += ( 4.0 / ( M_PI * (1.0 + e_r / 2.0) ) ) * acosh( 1.0 + 2.0 * w_h / s_h );
|
||||
|
@ -618,6 +616,7 @@ void C_MICROSTRIP::syn_err_fun( double* f1,
|
|||
{
|
||||
*f2 += (1.0 / M_PI) * acosh( 1.0 + 2.0 * w_h / s_h );
|
||||
}
|
||||
|
||||
*f1 -= w_h_se;
|
||||
*f2 -= w_h_so;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ private:
|
|||
double er_eff_o; // odd-mode effective dielectric constant
|
||||
double er_eff_e_0; // static even-mode effective dielectric constant
|
||||
double er_eff_o_0; // static odd-mode effective dielectric constant
|
||||
double er_eff; // FIXME: dummy
|
||||
double w_eff; // Effective width of line
|
||||
double atten_dielectric_e; // even-mode dielectric losses (dB)
|
||||
double atten_cond_e; // even-mode conductors losses (dB)
|
||||
|
|
|
@ -136,7 +136,8 @@ double TRANSLINE::skin_depth()
|
|||
|
||||
/* The function computes the complete elliptic integral of first kind
|
||||
* K() and the second kind E() using the arithmetic-geometric mean
|
||||
* algorithm (AGM) by Abramowitz and Stegun. */
|
||||
* algorithm (AGM) by Abramowitz and Stegun.
|
||||
*/
|
||||
void TRANSLINE::ellipke( double arg, double& k, double& e )
|
||||
{
|
||||
int iMax = 16;
|
||||
|
@ -153,7 +154,7 @@ void TRANSLINE::ellipke( double arg, double& k, double& e )
|
|||
}
|
||||
else
|
||||
{
|
||||
double a, b, c, f, s, fk = 1, fe = 1, t, da = arg;
|
||||
double a, b, c, fr, s, fk = 1, fe = 1, t, da = arg;
|
||||
int i;
|
||||
if( arg < 0 )
|
||||
{
|
||||
|
@ -164,16 +165,16 @@ void TRANSLINE::ellipke( double arg, double& k, double& e )
|
|||
a = 1;
|
||||
b = sqrt( 1 - da );
|
||||
c = sqrt( da );
|
||||
f = 0.5;
|
||||
s = f * c * c;
|
||||
fr = 0.5;
|
||||
s = fr * c * c;
|
||||
for( i = 0; i < iMax; i++ )
|
||||
{
|
||||
t = (a + b) / 2;
|
||||
c = (a - b) / 2;
|
||||
b = sqrt( a * b );
|
||||
a = t;
|
||||
f *= 2;
|
||||
s += f * c * c;
|
||||
fr *= 2;
|
||||
s += fr * c * c;
|
||||
if( c / a < NR_EPSI )
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -750,10 +750,10 @@ bool DIALOG_MODULE_BOARD_EDITOR::TransferDataFromWindow()
|
|||
m_CurrentModule->Flip( m_CurrentModule->GetPosition() );
|
||||
|
||||
// Update 3D shape list
|
||||
int ii = m_3D_ShapeNameListBox->GetSelection();
|
||||
int idx = m_3D_ShapeNameListBox->GetSelection();
|
||||
|
||||
if( ii >= 0 )
|
||||
TransfertDisplayTo3DValues( ii );
|
||||
if( idx >= 0 )
|
||||
TransfertDisplayTo3DValues( idx );
|
||||
|
||||
S3D_MASTER* draw3D = m_CurrentModule->Models();
|
||||
|
||||
|
|
|
@ -564,10 +564,10 @@ void DIALOG_MODULE_MODULE_EDITOR::OnOkClick( wxCommandEvent& event )
|
|||
m_currentModule->SetLocalSolderPasteMarginRatio( dtmp / 100 );
|
||||
|
||||
// Update 3D shape list
|
||||
int ii = m_3D_ShapeNameListBox->GetSelection();
|
||||
int idx = m_3D_ShapeNameListBox->GetSelection();
|
||||
|
||||
if ( ii >= 0 )
|
||||
TransfertDisplayTo3DValues( ii );
|
||||
if ( idx >= 0 )
|
||||
TransfertDisplayTo3DValues( idx );
|
||||
|
||||
S3D_MASTER* draw3D = m_currentModule->Models();
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC )
|
|||
if( configChanged && !GetBoard()->GetFileName().IsEmpty()
|
||||
&& IsOK( NULL, _( "The project configuration has changed. Do you want to save it?" ) ) )
|
||||
{
|
||||
wxFileName fn = Prj().AbsolutePath( GetBoard()->GetFileName() );
|
||||
fn = Prj().AbsolutePath( GetBoard()->GetFileName() );
|
||||
fn.SetExt( ProjectFileExtension );
|
||||
|
||||
wxString pro_name = fn.GetFullPath();
|
||||
|
|
|
@ -153,9 +153,9 @@ void PCB_EDIT_FRAME::Delete_Drawings_All_Layer( LAYER_ID aLayer )
|
|||
return;
|
||||
}
|
||||
|
||||
wxString msg = wxString::Format(
|
||||
_( "Delete everything on layer %s?" ),
|
||||
GetChars( GetBoard()->GetLayerName( aLayer ) ) );
|
||||
wxString msg;
|
||||
msg.Printf( _( "Delete everything on layer %s?" ),
|
||||
GetChars( GetBoard()->GetLayerName( aLayer ) ) );
|
||||
|
||||
if( !IsOK( this, msg ) )
|
||||
return;
|
||||
|
@ -185,7 +185,6 @@ void PCB_EDIT_FRAME::Delete_Drawings_All_Layer( LAYER_ID aLayer )
|
|||
|
||||
default:
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( wxT("Delete_Drawings_All_Layer() error: unknown type %d"),
|
||||
item->Type() );
|
||||
wxMessageBox( msg );
|
||||
|
|
|
@ -699,13 +699,13 @@ static void CreateComponentsSection( FILE* aFile, BOARD* aPcb )
|
|||
{
|
||||
const char* mirror;
|
||||
const char* flip;
|
||||
double orient = module->GetOrientation();
|
||||
double fp_orient = module->GetOrientation();
|
||||
|
||||
if( module->GetFlag() )
|
||||
{
|
||||
mirror = "0";
|
||||
flip = "FLIP";
|
||||
NEGATE_AND_NORMALIZE_ANGLE_POS( orient );
|
||||
NEGATE_AND_NORMALIZE_ANGLE_POS( fp_orient );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -724,7 +724,7 @@ static void CreateComponentsSection( FILE* aFile, BOARD* aPcb )
|
|||
fprintf( aFile, "LAYER %s\n",
|
||||
(module->GetFlag()) ? "BOTTOM" : "TOP" );
|
||||
fprintf( aFile, "ROTATION %g\n",
|
||||
orient / 10.0 );
|
||||
fp_orient / 10.0 );
|
||||
fprintf( aFile, "SHAPE %s %s %s\n",
|
||||
TO_UTF8( module->GetReference() ),
|
||||
mirror, flip );
|
||||
|
@ -734,14 +734,14 @@ static void CreateComponentsSection( FILE* aFile, BOARD* aPcb )
|
|||
|
||||
for( int ii = 0; ii < 2; ii++ )
|
||||
{
|
||||
double orient = textmod->GetOrientation();
|
||||
double txt_orient = textmod->GetOrientation();
|
||||
std::string layer = GenCADLayerName( cu_count, module->GetFlag() ? B_SilkS : F_SilkS );
|
||||
|
||||
fprintf( aFile, "TEXT %g %g %g %g %s %s \"%s\"",
|
||||
textmod->GetPos0().x / SCALE_FACTOR,
|
||||
-textmod->GetPos0().y / SCALE_FACTOR,
|
||||
textmod->GetSize().x / SCALE_FACTOR,
|
||||
orient / 10.0,
|
||||
txt_orient / 10.0,
|
||||
mirror,
|
||||
layer.c_str(),
|
||||
TO_UTF8( textmod->GetText() ) );
|
||||
|
|
|
@ -751,16 +751,9 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event )
|
|||
|
||||
void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event )
|
||||
{
|
||||
#if 0 // cannot remember why this is here
|
||||
// The PCB_EDIT_FRAME may not be the FOOTPRINT_VIEW_FRAME's parent,
|
||||
// so use Kiway().Player() to fetch.
|
||||
PCB_EDIT_FRAME* parent = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, true );
|
||||
(void*) parent;
|
||||
#endif
|
||||
|
||||
wxString nickname = getCurNickname();
|
||||
MODULE* oldmodule = GetBoard()->m_Modules;
|
||||
MODULE* module = LoadModuleFromLibrary( nickname, Prj().PcbFootprintLibs(), false );
|
||||
wxString curr_nickname = getCurNickname();
|
||||
MODULE* oldmodule = GetBoard()->m_Modules;
|
||||
MODULE* module = LoadModuleFromLibrary( curr_nickname, Prj().PcbFootprintLibs(), false );
|
||||
|
||||
if( module )
|
||||
{
|
||||
|
|
|
@ -306,7 +306,6 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER* aReporter )
|
|||
{
|
||||
if( aReporter )
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( _( "Component '%s' footprint '%s' was not found in "
|
||||
"any libraries in the footprint library table.\n" ),
|
||||
GetChars( component->GetReference() ),
|
||||
|
|
|
@ -670,8 +670,8 @@ void PCB_EDIT_FRAME::updateViaSizeSelectBox()
|
|||
{
|
||||
msg << wxT("/ ");
|
||||
wxString hole_str;
|
||||
double valueMils = To_User_Unit( INCHES, hole ) * 1000;
|
||||
double value_mm = To_User_Unit( MILLIMETRES, hole );
|
||||
valueMils = To_User_Unit( INCHES, hole ) * 1000;
|
||||
value_mm = To_User_Unit( MILLIMETRES, hole );
|
||||
|
||||
if( mmFirst )
|
||||
hole_str.Printf( _( "%.2f mm (%.1f mils)" ),
|
||||
|
|
|
@ -459,13 +459,13 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList_NG( BOARD* aPcb )
|
|||
if (g_DumpZonesWhenFilling)
|
||||
dumper->Write( &solidAreas, "solid-areas-minus-holes" );
|
||||
|
||||
SHAPE_POLY_SET fractured = solidAreas;
|
||||
fractured.Fracture( POLY_CALC_MODE );
|
||||
SHAPE_POLY_SET areas_fractured = solidAreas;
|
||||
areas_fractured.Fracture( POLY_CALC_MODE );
|
||||
|
||||
if (g_DumpZonesWhenFilling)
|
||||
dumper->Write( &fractured, "fractured" );
|
||||
dumper->Write( &areas_fractured, "areas_fractured" );
|
||||
|
||||
m_FilledPolysList = fractured;
|
||||
m_FilledPolysList = areas_fractured;
|
||||
|
||||
// Remove insulated islands:
|
||||
if( GetNetCode() > 0 )
|
||||
|
@ -490,13 +490,13 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList_NG( BOARD* aPcb )
|
|||
dumper->Write( &thermalHoles, "thermal-holes" );
|
||||
|
||||
// put these areas in m_FilledPolysList
|
||||
SHAPE_POLY_SET fractured = solidAreas;
|
||||
fractured.Fracture( POLY_CALC_MODE );
|
||||
SHAPE_POLY_SET th_fractured = solidAreas;
|
||||
th_fractured.Fracture( POLY_CALC_MODE );
|
||||
|
||||
if( g_DumpZonesWhenFilling )
|
||||
dumper->Write ( &fractured, "fractured" );
|
||||
dumper->Write ( &th_fractured, "th_fractured" );
|
||||
|
||||
m_FilledPolysList = fractured;
|
||||
m_FilledPolysList = th_fractured;
|
||||
|
||||
if( GetNetCode() > 0 )
|
||||
TestForCopperIslandAndRemoveInsulatedIslands( aPcb );
|
||||
|
|
Loading…
Reference in New Issue