Fix minor bug #1429990 (3D viewer shows hidden footprint graphic texts ). Fix minor coverity warnings (not initialized members and dead code)

This commit is contained in:
jean-pierre charras 2015-03-11 14:59:43 +01:00
parent b6c5b291a2
commit f16e083ecf
20 changed files with 212 additions and 186 deletions

View File

@ -118,13 +118,14 @@ void S3D_MESH::openGL_Render()
}
for( unsigned int idx = 0; idx < m_CoordIndex.size(); idx++ )
{
if( m_Materials )
{
if( m_MaterialIndex.size() == 0 )
m_Materials->SetOpenGLMaterial( 0, useMaterial );
else
if( m_Materials )
m_Materials->SetOpenGLMaterial( m_MaterialIndex[idx], useMaterial );
}
switch( m_CoordIndex[idx].size() )
{

View File

@ -95,10 +95,7 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName )
// it now has, so we decrement the count of components without
// a footprint assigned.
if( !hasFootprint )
{
hasFootprint = true;
m_undefinedComponentCnt -= 1;
}
// Set the new description and deselect the processed component
m_compListBox->SetString( componentIndex, description );

View File

@ -305,9 +305,6 @@ void SCH_EDIT_FRAME::OnSelectUnit( wxCommandEvent& aEvent )
if( unitCount <= 1 || component->GetUnit() == unit )
return;
if( unit < 1 )
unit = 1;
if( unit > unitCount )
unit = unitCount;

View File

@ -33,48 +33,22 @@
#include <dialog_helpers.h>
#include <class_DCodeSelectionbox.h>
/* Process the command triggered by the left button of the mouse when a tool
* is already selected.
/* Process the command triggered by the left button of the mouse
* currently: just display info in the message panel.
*/
void GERBVIEW_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
{
GERBER_DRAW_ITEM* DrawStruct = (GERBER_DRAW_ITEM*) GetScreen()->GetCurItem();
wxString msg;
GERBER_DRAW_ITEM* DrawStruct = Locate( aPosition, CURSEUR_OFF_GRILLE );
if( GetToolId() == ID_NO_TOOL_SELECTED )
{
if( DrawStruct && DrawStruct->GetFlags() )
{
msg.Printf( wxT( "GERBVIEW_FRAME::OnLeftClick err: Struct %u, m_Flags = %X" ),
(unsigned) DrawStruct->Type(),
(unsigned) DrawStruct->GetFlags() );
wxFAIL_MSG( msg );
}
else
{
DrawStruct = Locate( aPosition, CURSEUR_OFF_GRILLE );
GetScreen()->SetCurItem( DrawStruct );
if( DrawStruct == NULL )
{
GERBER_IMAGE* gerber = g_GERBER_List.GetGbrImage( getActiveLayer() );
if( gerber )
gerber->DisplayImageInfo( );
}
}
}
switch( GetToolId() )
{
case ID_NO_TOOL_SELECTED:
break;
if( DrawStruct == NULL )
break;
default:
wxFAIL_MSG( wxT( "GERBVIEW_FRAME::ProcessCommand error" ) );
break;
}
}

View File

@ -42,6 +42,27 @@ C_MICROSTRIP::C_MICROSTRIP() : TRANSLINE()
aux_ms = NULL;
// Initialize these variables mainly to avoid warnings from a static analyzer
h = 0.0; // height of substrate
ht = 0.0; // height to the top of box
t = 0.0; // thickness of top metal
rough = 0.0; // Roughness of top metal
w = 0.0; // width of lines
w_t_e = 0.0; // even-mode thickness-corrected line width
w_t_o = 0.0; // odd-mode thickness-corrected line width
l = 0.0; // length of lines
s = 0.0; // spacing of lines
Z0_e_0 = 0.0; // static even-mode impedance
Z0_o_0 = 0.0; // static odd-mode impedance
Z0e = 0.0; // even-mode impedance
Z0o = 0.0; // odd-mode impedance
c_e = 0.0; // even-mode capacitance
c_o = 0.0; // odd-mode capacitance
ang_l_e = 0.0; // even-mode electrical length in angle
ang_l_o = 0.0; // odd-mode electrical length in angle
er_eff_e = 0.0; // even-mode effective dielectric constant
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)

View File

@ -3,7 +3,7 @@
*
* Copyright (C) 2002 Claudio Girardi <in3otd@qsl.net>
* Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org>
* Modifications for Kicad: Jean-Pierre Charras
* Modifications for Kicad: 2015 Jean-Pierre Charras
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -19,9 +19,9 @@
* along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef _C_MICROSTRIP_H_
#define _C_MICROSTRIP_H_
@ -31,33 +31,33 @@ public: C_MICROSTRIP();
~C_MICROSTRIP();
private:
double h; /* height of substrate */
double ht; /* height to the top of box */
double t; /* thickness of top metal */
double rough; /* Roughness of top metal */
double w; /* width of lines */
double w_t_e; /* even-mode thickness-corrected line width */
double w_t_o; /* odd-mode thickness-corrected line width */
double l; /* length of lines */
double s; /* spacing of lines */
double Z0_e_0; /* static even-mode impedance */
double Z0_o_0; /* static odd-mode impedance */
double Z0e; /* even-mode impedance */
double Z0o; /* odd-mode impedance */
double c_e; /* even-mode capacitance */
double c_o; /* odd-mode capacitance */
double ang_l_e; /* even-mode electrical length in angle */
double ang_l_o; /* odd-mode electrical length in angle */
double er_eff_e; /* even-mode effective dielectric constant */
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) */
double atten_dielectric_o; /* odd-mode dielectric losses (dB) */
double atten_cond_o; /* odd-mode conductors losses (dB) */
double h; // height of substrate
double ht; // height to the top of box
double t; // thickness of top metal
double rough; // Roughness of top metal
double w; // width of lines
double w_t_e; // even-mode thickness-corrected line width
double w_t_o; // odd-mode thickness-corrected line width
double l; // length of lines
double s; // spacing of lines
double Z0_e_0; // static even-mode impedance
double Z0_o_0; // static odd-mode impedance
double Z0e; // even-mode impedance
double Z0o; // odd-mode impedance
double c_e; // even-mode capacitance
double c_o; // odd-mode capacitance
double ang_l_e; // even-mode electrical length in angle
double ang_l_o; // odd-mode electrical length in angle
double er_eff_e; // even-mode effective dielectric constant
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)
double atten_dielectric_o; // odd-mode dielectric losses (dB)
double atten_cond_o; // odd-mode conductors losses (dB)
public:
void analyze();
@ -96,4 +96,4 @@ private:
MICROSTRIP* aux_ms;
};
#endif /* _C_MICROSTRIP_H_ */
#endif // _C_MICROSTRIP_H_

View File

@ -43,6 +43,10 @@ COAX::COAX() : TRANSLINE()
m_name = "Coax";
// Initialize these variables mainly to avoid warnings from a static analyzer
mur = 0.0; // magnetic permeability of substrate
din = 0.0; // Inner diameter of cable
dout = 0.0; // Outer diameter of cable
l = 0.0; // Length of cable
Z0 = 0.0; // characteristic impedance
ang_l = 0.0; // Electrical length in angle
atten_dielectric = 0.0; // Loss in dielectric (dB)

View File

@ -3,6 +3,7 @@
*
* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu>
* Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org>
* Modifications for Kicad: 2015 Jean-Pierre Charras
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -18,9 +19,9 @@
* along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef __COAX_H
#define __COAX_H
@ -29,15 +30,15 @@ class COAX : public TRANSLINE
public: COAX();
private:
double mur; /* magnetic permeability of substrate */
double din; /* Inner diameter of cable */
double dout; /* Outer diameter of cable */
double l; /* Length of cable */
double Z0; /* characteristic impedance */
double ang_l; /* Electrical length in angle */
double atten_dielectric; /* Loss in dielectric (dB) */
double atten_cond; /* Loss in conductors (dB) */
double fc; /* Cutoff frequency for higher order modes */
double mur; // magnetic permeability of substrate
double din; // Inner diameter of cable
double dout; // Outer diameter of cable
double l; // Length of cable
double Z0; // characteristic impedance
double ang_l; // Electrical length in angle
double atten_dielectric; // Loss in dielectric (dB)
double atten_cond; // Loss in conductors (dB)
double fc; // Cutoff frequency for higher order modes
public:
void analyze();
@ -55,4 +56,4 @@ private:
void show_results();
};
#endif /* __COAX_H */
#endif // __COAX_H

View File

@ -38,6 +38,11 @@ COPLANAR::COPLANAR() : TRANSLINE()
backMetal = false;
// Initialize these variables mainly to avoid warnings from a static analyzer
h = 0.0; // height of substrate
t = 0.0; // thickness of top metal
w = 0.0; // width of line
s = 0.0; // width of gap between line and ground
len = 0.0; // length of line
Z0 = 0.0; // characteristic impedance
ang_l = 0.0; // Electrical length in angle
atten_dielectric = 0.0; // Loss in dielectric (dB)

View File

@ -3,7 +3,7 @@
*
* Copyright (C) 2008 Michael Margraf <michael.margraf@alumni.tu-berlin.de>
* Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org>
* Modified for Kicad: 2011 jean-pierre.charras
* Modified for Kicad: 2015 jean-pierre.charras
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -19,9 +19,9 @@
* along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef __COPLANAR_H
#define __COPLANAR_H
@ -30,16 +30,16 @@ class COPLANAR : public TRANSLINE
public: COPLANAR();
private:
double h; /* height of substrate */
double t; /* thickness of top metal */
double w; /* width of line */
double s; /* width of gap between line and ground */
double len; /* length of line */
double Z0; /* characteristic impedance */
double er_eff; /* effective dielectric constant */
double ang_l; /* Electrical length in angle */
double atten_dielectric; /* Loss in dielectric (dB) */
double atten_cond; /* Loss in conductors (dB) */
double h; // height of substrate
double t; // thickness of top metal
double w; // width of line
double s; // width of gap between line and ground
double len; // length of line
double Z0; // characteristic impedance
double er_eff; // effective dielectric constant
double ang_l; // Electrical length in angle
double atten_dielectric; // Loss in dielectric (dB)
double atten_cond; // Loss in conductors (dB)
public:
void analyze();
@ -60,4 +60,4 @@ class GROUNDEDCOPLANAR : public COPLANAR
public: GROUNDEDCOPLANAR();
};
#endif /* __COPLANAR_H */
#endif // __COPLANAR_H

View File

@ -4,7 +4,7 @@
* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu>
* Copyright (C) 2002 Claudio Girardi <claudio.girardi@ieee.org>
* Copyright (C) 2005, 2006 Stefan Jahn <stefan@lkcc.org>
* Modified for Kicad: 2011 jean-pierre.charras
* Modified for Kicad: 2015 jean-pierre.charras
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -43,6 +43,18 @@ MICROSTRIP::MICROSTRIP() : TRANSLINE()
m_name = "MicroStrip";
// Initialize these variables mainly to avoid warnings from a static analyzer
h = 0.0; // height of substrate
ht = 0.0; // height to the top of box
t = 0.0; // thickness of top metal
rough = 0.0; // Roughness of top metal
mur = 0.0; // magnetic permeability of substrate
w = 0.0; // width of line
l = 0.0; // length of line
Z0_0 = 0.0; // static characteristic impedance
Z0 = 0.0; // characteristic impedance
ang_l = 0.0; // Electrical length in angle
er_eff_0 = 0.0; // Static effective dielectric constant
er_eff = 0.0; // Effective dielectric constant
mur_eff = 0.0; // Effective mag. permeability
w_eff = 0.0; // Effective width of line
atten_dielectric = 0.0; // Loss in dielectric (dB)

View File

@ -3,6 +3,7 @@
*
* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu>
* Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org>
* Modified for Kicad: 2015 jean-pierre.charras
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -18,9 +19,9 @@
* along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef __MICROSTRIP_H
#define __MICROSTRIP_H
@ -31,25 +32,25 @@ public: MICROSTRIP();
friend class C_MICROSTRIP;
private:
double h; /* height of substrate */
double ht; /* height to the top of box */
double t; /* thickness of top metal */
double rough; /* Roughness of top metal */
double mur; /* magnetic permeability of substrate */
double w; /* width of line */
double l; /* length of line */
double Z0_0; /* static characteristic impedance */
double Z0; /* characteristic impedance */
double ang_l; /* Electrical length in angle */
double er_eff_0; /* Static effective dielectric constant */
double er_eff; /* Effective dielectric constant */
double mur_eff; /* Effective mag. permeability */
double w_eff; /* Effective width of line */
double atten_dielectric; /* Loss in dielectric (dB) */
double atten_cond; /* Loss in conductors (dB) */
double h; // height of substrate
double ht; // height to the top of box
double t; // thickness of top metal
double rough; // Roughness of top metal
double mur; // magnetic permeability of substrate
double w; // width of line
double l; // length of line
double Z0_0; // static characteristic impedance
double Z0; // characteristic impedance
double ang_l; // Electrical length in angle
double er_eff_0; // Static effective dielectric constant
double er_eff; // Effective dielectric constant
double mur_eff; // Effective mag. permeability
double w_eff; // Effective width of line
double atten_dielectric; // Loss in dielectric (dB)
double atten_cond; // Loss in conductors (dB)
/* private params */
double Z0_h_1; /* homogeneous stripline impedance */
// private params
double Z0_h_1; // homogeneous stripline impedance
public:
void analyze();
@ -88,4 +89,4 @@ private:
void show_results();
};
#endif /* __MICROSTRIP_H */
#endif // __MICROSTRIP_H

View File

@ -34,6 +34,14 @@ RECTWAVEGUIDE::RECTWAVEGUIDE() : TRANSLINE()
m_name = "RectWaveGuide";
// Initialize these here variables mainly to avoid warnings from a static analyzer
mur = 0.0; // magnetic permeability of substrate
tanm = 0.0; // Magnetic Loss Tangent
a = 0.0; // width of waveguide
b = 0.0; // height of waveguide
l = 0.0; // length of waveguide
Z0 = 0.0; // characteristic impedance
Z0EH = 0.0; // characteristic impedance of field quantities*/
ang_l = 0.0; // Electrical length in angle
er_eff = 0.0; // Effective dielectric constant
mur_eff = 0.0; // Effective mag. permeability
atten_dielectric = 0.0; // Loss in dielectric (dB)

View File

@ -3,6 +3,7 @@
*
* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu>
* Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org>
* Modified for Kicad: 2015 jean-pierre.charras
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -18,9 +19,9 @@
* along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef __RECTWAVEGUIDE_H
#define __RECTWAVEGUIDE_H
@ -29,19 +30,19 @@ class RECTWAVEGUIDE : public TRANSLINE
public: RECTWAVEGUIDE();
private:
double mur; /* magnetic permeability of substrate */
double tanm; /* Magnetic Loss Tangent */
double a; /* width of waveguide */
double b; /* height of waveguide */
double l; /* length of waveguide */
double Z0; /* characteristic impedance */
double Z0EH; /* characteristic impedance of field quantities*/
double ang_l; /* Electrical length in angle */
double er_eff; /* Effective dielectric constant */
double mur_eff; /* Effective mag. permeability */
double atten_dielectric; /* Loss in dielectric (dB) */
double atten_cond; /* Loss in conductors (dB) */
double fc10; /* Cutoff frequency for TE10 mode */
double mur; // magnetic permeability of substrate
double tanm; // Magnetic Loss Tangent
double a; // width of waveguide
double b; // height of waveguide
double l; // length of waveguide
double Z0; // characteristic impedance
double Z0EH; // characteristic impedance of field quantities*/
double ang_l; // Electrical length in angle
double er_eff; // Effective dielectric constant
double mur_eff; // Effective mag. permeability
double atten_dielectric; // Loss in dielectric (dB)
double atten_cond; // Loss in conductors (dB)
double fc10; // Cutoff frequency for TE10 mode
public:
void analyze();
@ -61,4 +62,4 @@ private:
void show_results();
};
#endif /* __RECTWAVEGUIDE_H */
#endif // __RECTWAVEGUIDE_H

View File

@ -36,6 +36,11 @@ STRIPLINE::STRIPLINE() : TRANSLINE()
m_name = "StripLine";
// Initialize these variables mainly to avoid warnings from a static analyzer
h = 0.0; // height of substrate
a = 0.0; // distance of strip to top metal
t = 0.0; // thickness of top metal
w = 0.0; // width of line
len = 0.0; // length of line
Z0 = 0.0; // characteristic impedance
ang_l = 0.0; // Electrical length in angle
er_eff = 0.0; // effective dielectric constant

View File

@ -36,6 +36,11 @@ TWISTEDPAIR::TWISTEDPAIR() : TRANSLINE()
m_name = "TwistedPair";
// Initialize these variables mainly to avoid warnings from a static analyzer
din = 0.0; // Inner diameter of conductor
dout = 0.0; // Outer diameter of insulator
twists = 0.0; // Twists per length
er_env = 0.0; // dielectric constant of environment*/
len = 0.0; // Length of cable
Z0 = 0.0; // characteristic impedance
ang_l = 0.0; // Electrical length in angle
atten_dielectric = 0.0; // Loss in dielectric (dB)

View File

@ -2,7 +2,7 @@
* twistedpair.h - twisted pair class definition
*
* Copyright (C) 2011 Michael Margraf <michael.margraf@alumni.tu-berlin.de>
* Modifications 2011 for Kicad: Jean-Pierre Charras
* Modified for Kicad: 2015 jean-pierre.charras
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -18,9 +18,9 @@
* along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef __TWISTEDPAIR_H
#define __TWISTEDPAIR_H
@ -29,16 +29,16 @@ class TWISTEDPAIR : public TRANSLINE
public: TWISTEDPAIR();
private:
double din; /* Inner diameter of conductor */
double dout; /* Outer diameter of insulator */
double twists; /* Twists per length */
double er_env; /* dielectric constant of environment*/
double len; /* Length of cable */
double Z0; /* characteristic impedance */
double ang_l; /* Electrical length in angle */
double er_eff; /* Effective dielectric constant */
double atten_dielectric; /* Loss in dielectric (dB) */
double atten_cond; /* Loss in conductors (dB) */
double din; // Inner diameter of conductor
double dout; // Outer diameter of insulator
double twists; // Twists per length
double er_env; // dielectric constant of environment*/
double len; // Length of cable
double Z0; // characteristic impedance
double ang_l; // Electrical length in angle
double er_eff; // Effective dielectric constant
double atten_dielectric; // Loss in dielectric (dB)
double atten_cond; // Loss in conductors (dB)
public:
void analyze();

View File

@ -194,8 +194,10 @@ void MODULE::TransformGraphicShapesWithClearanceToPolygonSet(
case PCB_MODULE_TEXT_T:
{
TEXTE_MODULE* text = static_cast<TEXTE_MODULE*>( item );
if( text->GetLayer() == aLayer )
if( text->GetLayer() == aLayer && text->IsVisible() )
texts.push_back( text );
break;
}

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2015 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
@ -545,20 +545,14 @@ const EDA_RECT MODULE::GetBoundingBox() const
void MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
{
int nbpad;
char bufcar[512], Line[512];
wxString msg;
aList.push_back( MSG_PANEL_ITEM( m_Reference->GetShownText(), m_Value->GetShownText(), DARKCYAN ) );
// Display last date the component was edited (useful in Module Editor).
time_t edit_time = m_LastEditTime;
strcpy( Line, ctime( &edit_time ) );
strtok( Line, " \n\r" );
strcpy( bufcar, strtok( NULL, " \n\r" ) ); strcat( bufcar, " " );
strcat( bufcar, strtok( NULL, " \n\r" ) ); strcat( bufcar, ", " );
strtok( NULL, " \n\r" );
strcat( bufcar, strtok( NULL, " \n\r" ) );
msg = FROM_UTF8( bufcar );
wxDateTime date( m_LastEditTime );
// Date format: see http://www.cplusplus.com/reference/ctime/strftime
msg = date.Format( wxT( "%b %d, %Y" ) ); // Abbreviated_month_name Day, Year
aList.push_back( MSG_PANEL_ITEM( _( "Last Change" ), msg, BROWN ) );
// display schematic path

View File

@ -273,9 +273,7 @@ void DIALOG_PRINT_USING_PRINTER::initValues( )
m_FineAdjustYscaleOpt->SetValue( msg );
bool enable = (s_Parameters.m_PrintScale == 1.0);
if( m_FineAdjustXscaleOpt )
m_FineAdjustXscaleOpt->Enable(enable);
if( m_FineAdjustYscaleOpt )
m_FineAdjustYscaleOpt->Enable(enable);
}