pcbnew: fix minor issues.

pcb_calculator: fix a compil warning (gcc 4.7)
This commit is contained in:
jean-pierre charras 2012-11-12 17:19:10 +01:00
parent 4612ef9d50
commit 89a40eeb80
5 changed files with 23 additions and 7 deletions

View File

@ -47,10 +47,10 @@ protected:
protected: protected:
// The constructor is protected, because this class is not intendent to be instancied // The constructor is protected, because this class is not intended to be instancied
ATTENUATOR( ATTENUATORS_TYPE Topology ); ATTENUATOR( ATTENUATORS_TYPE Topology );
public: public:
~ATTENUATOR(); virtual ~ATTENUATOR();
/** /**
* Function Calculate * Function Calculate
@ -76,25 +76,33 @@ public:
class ATTENUATOR_PI : public ATTENUATOR class ATTENUATOR_PI : public ATTENUATOR
{ {
public: ATTENUATOR_PI(); public:
ATTENUATOR_PI();
~ATTENUATOR_PI(){};
virtual bool Calculate(); virtual bool Calculate();
}; };
class ATTENUATOR_TEE : public ATTENUATOR class ATTENUATOR_TEE : public ATTENUATOR
{ {
public: ATTENUATOR_TEE(); public:
ATTENUATOR_TEE();
~ATTENUATOR_TEE(){};
virtual bool Calculate(); virtual bool Calculate();
}; };
class ATTENUATOR_BRIDGE : public ATTENUATOR class ATTENUATOR_BRIDGE : public ATTENUATOR
{ {
public: ATTENUATOR_BRIDGE(); public:
ATTENUATOR_BRIDGE();
~ATTENUATOR_BRIDGE(){};
virtual bool Calculate(); virtual bool Calculate();
}; };
class ATTENUATOR_SPLITTER : public ATTENUATOR class ATTENUATOR_SPLITTER : public ATTENUATOR
{ {
public: ATTENUATOR_SPLITTER(); public:
ATTENUATOR_SPLITTER();
~ATTENUATOR_SPLITTER(){};
virtual bool Calculate(); virtual bool Calculate();
}; };

View File

@ -24,7 +24,7 @@
#define DEFAULT_TEXT_MODULE_SIZE Millimeter2iu( 1.5 ) #define DEFAULT_TEXT_MODULE_SIZE Millimeter2iu( 1.5 )
#define DEFAULT_GR_MODULE_THICKNESS Millimeter2iu( 0.15 ) #define DEFAULT_GR_MODULE_THICKNESS Millimeter2iu( 0.15 )
#define DEFAULT_SOLDERMASK_CLEARANCE Millimeter2iu( 0.1 ) #define DEFAULT_SOLDERMASK_CLEARANCE Millimeter2iu( 0.2 )
#define DEFAULT_SOLDERMASK_MIN_WIDTH Millimeter2iu( 0.0 ) #define DEFAULT_SOLDERMASK_MIN_WIDTH Millimeter2iu( 0.0 )

View File

@ -259,6 +259,7 @@ void FOOTPRINT_EDIT_FRAME::Export_Module( MODULE* aModule, bool aCreateSysLib )
module->SetOrientation( 0 ); module->SetOrientation( 0 );
*/ */
LOCALE_IO toggle;
pcb_io.Format( aModule ); pcb_io.Format( aModule );
FILE* fp = wxFopen( dlg.GetPath(), wxT( "wt" ) ); FILE* fp = wxFopen( dlg.GetPath(), wxT( "wt" ) );

View File

@ -1700,6 +1700,8 @@ MODULE* PCB_PARSER::parseMODULE() throw( IO_ERROR, PARSE_ERROR )
} }
} }
module->CalculateBoundingBox();
return module.release(); return module.release();
} }

View File

@ -193,6 +193,11 @@ Changing extension to .brd." ), GetChars( fn.GetFullPath() ) );
} }
} }
else
// No file to open: initialize a new empty board
// using default values for design settings:
frame->Clear_Pcb( false );
// update the layer names in the listbox // update the layer names in the listbox
frame->ReCreateLayerBox( NULL ); frame->ReCreateLayerBox( NULL );