Commit 8c72db66 authored by Wayne Stambaugh's avatar Wayne Stambaugh

Pcbnew s-expression file parser bug fixes and file size improvements.

* Use index when saving layers to handle translated layer names.
* Add LOCALE_IO switcher when loading s-expression format.
* Make SEGVIA default to through hole to improve file size.
* Don't save default orientation of 0 degrees in TEXTE_MODULE and TEXTE_PCB.
* Don't save default zone configuration parameters.
* Save multiple zone corners on a single line.
* Fixed missing ( check in graphic and module arc parsers.
* Consistency improvements for DRAWSEGMENT and EDGE_MODULE objects.
* Minor tweaks to D_PAD formatting.
parent d9ed8a30
...@@ -129,8 +129,8 @@ priority ...@@ -129,8 +129,8 @@ priority
pts pts
radius radius
rev rev
rect
rect_delta rect_delta
rectangle
reference reference
right right
rotate rotate
...@@ -165,7 +165,6 @@ trapezoid ...@@ -165,7 +165,6 @@ trapezoid
thru thru
thru_hole thru_hole
tstamp tstamp
use_thermal
user user
user_trace_width user_trace_width
user_via user_via
......
...@@ -74,10 +74,14 @@ BOARD::BOARD() : ...@@ -74,10 +74,14 @@ BOARD::BOARD() :
BuildListOfNets(); // prepare pad and netlist containers. BuildListOfNets(); // prepare pad and netlist containers.
for( int layer = 0; layer < NB_COPPER_LAYERS; ++layer ) for( int layer = 0; layer < LAYER_COUNT; ++layer )
{ {
m_Layer[layer].m_Name = GetDefaultLayerName( layer ); m_Layer[layer].m_Name = GetDefaultLayerName( layer );
m_Layer[layer].m_Type = LT_SIGNAL;
if( layer <= LAST_COPPER_LAYER )
m_Layer[layer].m_Type = LT_SIGNAL;
else
m_Layer[layer].m_Type = LT_UNDEFINED;
} }
m_NetClasses.GetDefault()->SetDescription( _( "This is the default net class." ) ); m_NetClasses.GetDefault()->SetDescription( _( "This is the default net class." ) );
...@@ -356,8 +360,8 @@ wxString BOARD::GetLayerName( int aLayerIndex ) const ...@@ -356,8 +360,8 @@ wxString BOARD::GetLayerName( int aLayerIndex ) const
if( !IsValidLayerIndex( aLayerIndex ) ) if( !IsValidLayerIndex( aLayerIndex ) )
return wxEmptyString; return wxEmptyString;
// copper layer names are stored in the BOARD. // All layer names are stored in the BOARD.
if( IsValidCopperLayerIndex( aLayerIndex ) && IsLayerEnabled( aLayerIndex ) ) if( IsLayerEnabled( aLayerIndex ) )
{ {
// default names were set in BOARD::BOARD() but they may be // default names were set in BOARD::BOARD() but they may be
// over-ridden by BOARD::SetLayerName() // over-ridden by BOARD::SetLayerName()
......
...@@ -199,7 +199,7 @@ private: ...@@ -199,7 +199,7 @@ private:
/// edge zone descriptors, owned by pointer. /// edge zone descriptors, owned by pointer.
ZONE_CONTAINERS m_ZoneDescriptorList; ZONE_CONTAINERS m_ZoneDescriptorList;
LAYER m_Layer[NB_COPPER_LAYERS]; LAYER m_Layer[LAYER_COUNT];
// if true m_highLight_NetCode is used // if true m_highLight_NetCode is used
HIGH_LIGHT_INFO m_highLight; // current high light data HIGH_LIGHT_INFO m_highLight; // current high light data
HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data
......
...@@ -186,6 +186,7 @@ wxString SEGZONE::GetSelectMenuText() const ...@@ -186,6 +186,7 @@ wxString SEGZONE::GetSelectMenuText() const
SEGVIA::SEGVIA( BOARD_ITEM* aParent ) : SEGVIA::SEGVIA( BOARD_ITEM* aParent ) :
TRACK( aParent, PCB_VIA_T ) TRACK( aParent, PCB_VIA_T )
{ {
SetShape( VIA_THROUGH );
} }
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment