Commit 463c17b8 authored by Dick Hollenbeck's avatar Dick Hollenbeck

fix EDA_ITEM::Show() prototype bug, fix KICAD_PLUGIN::Save() problem with netclasses.

parent 02bb2111
...@@ -80,6 +80,10 @@ public: ...@@ -80,6 +80,10 @@ public:
S3D_MATERIAL* Back() const { return (S3D_MATERIAL*) Pback; } S3D_MATERIAL* Back() const { return (S3D_MATERIAL*) Pback; }
void SetMaterial(); void SetMaterial();
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
}; };
...@@ -131,6 +135,10 @@ public: ...@@ -131,6 +135,10 @@ public:
int ReadAppearance( FILE* file, int* LineNum ); int ReadAppearance( FILE* file, int* LineNum );
int ReadGeometry( FILE* file, int* LineNum ); int ReadGeometry( FILE* file, int* LineNum );
void Set_Object_Coords( std::vector< S3D_Vertex >& aVertices ); void Set_Object_Coords( std::vector< S3D_Vertex >& aVertices );
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
}; };
...@@ -150,6 +158,10 @@ public: ...@@ -150,6 +158,10 @@ public:
Struct3D_Shape* Back() const { return (Struct3D_Shape*) Pback; } Struct3D_Shape* Back() const { return (Struct3D_Shape*) Pback; }
int ReadData( FILE* file, int* LineNum ); int ReadData( FILE* file, int* LineNum );
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
}; };
...@@ -185,5 +197,4 @@ public: ...@@ -185,5 +197,4 @@ public:
void SetToolTip( const wxString& text ); void SetToolTip( const wxString& text );
}; };
#endif // STRUCT_3D_H
#endif /* STRUCT_3D_H */
...@@ -516,7 +516,7 @@ void BASE_SCREEN::InsertItem( EDA_ITEMS::iterator aIter, EDA_ITEM* aItem ) ...@@ -516,7 +516,7 @@ void BASE_SCREEN::InsertItem( EDA_ITEMS::iterator aIter, EDA_ITEM* aItem )
#if defined(DEBUG) #if defined(DEBUG)
void BASE_SCREEN::Show( int nestLevel, std::ostream& os ) void BASE_SCREEN::Show( int nestLevel, std::ostream& os ) const
{ {
EDA_ITEM* item = m_drawList; EDA_ITEM* item = m_drawList;
......
...@@ -215,7 +215,6 @@ bool EDA_ITEM::operator<( const EDA_ITEM& aItem ) const ...@@ -215,7 +215,6 @@ bool EDA_ITEM::operator<( const EDA_ITEM& aItem ) const
#if defined(DEBUG) #if defined(DEBUG)
// A function that should have been in wxWidgets // A function that should have been in wxWidgets
std::ostream& operator<<( std::ostream& out, const wxSize& size ) std::ostream& operator<<( std::ostream& out, const wxSize& size )
{ {
...@@ -232,12 +231,12 @@ std::ostream& operator<<( std::ostream& out, const wxPoint& pt ) ...@@ -232,12 +231,12 @@ std::ostream& operator<<( std::ostream& out, const wxPoint& pt )
} }
void EDA_ITEM::Show( int nestLevel, std::ostream& os ) const void EDA_ITEM::ShowDummy( std::ostream& os ) const
{ {
// XML output: // XML output:
wxString s = GetClass(); wxString s = GetClass();
NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str() << ">" os << '<' << s.Lower().mb_str() << ">"
<< " Need ::Show() override for this class " << " Need ::Show() override for this class "
<< "</" << s.Lower().mb_str() << ">\n"; << "</" << s.Lower().mb_str() << ">\n";
} }
...@@ -253,7 +252,6 @@ std::ostream& EDA_ITEM::NestedSpace( int nestLevel, std::ostream& os ) ...@@ -253,7 +252,6 @@ std::ostream& EDA_ITEM::NestedSpace( int nestLevel, std::ostream& os )
return os; return os;
} }
#endif #endif
......
...@@ -167,6 +167,10 @@ public: ...@@ -167,6 +167,10 @@ public:
} }
bool operator==( const LIB_ALIAS* aAlias ) const { return this == aAlias; } bool operator==( const LIB_ALIAS* aAlias ) const { return this == aAlias; }
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
}; };
extern bool operator<( const LIB_ALIAS& aItem1, const LIB_ALIAS& aItem2 ); extern bool operator<( const LIB_ALIAS& aItem1, const LIB_ALIAS& aItem2 );
...@@ -672,7 +676,10 @@ public: ...@@ -672,7 +676,10 @@ public:
bool ShowPinNumbers() { return m_showPinNumbers; } bool ShowPinNumbers() { return m_showPinNumbers; }
bool operator==( const LIB_COMPONENT* aComponent ) const { return this == aComponent; } bool operator==( const LIB_COMPONENT* aComponent ) const { return this == aComponent; }
};
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
};
#endif // CLASS_LIBENTRY_H #endif // CLASS_LIBENTRY_H
...@@ -94,7 +94,7 @@ const char* ShowType( NETLIST_ITEM_T aType ) ...@@ -94,7 +94,7 @@ const char* ShowType( NETLIST_ITEM_T aType )
} }
void NETLIST_OBJECT::Show( std::ostream& out, int ndx ) void NETLIST_OBJECT::Show( std::ostream& out, int ndx ) const
{ {
wxString path = m_SheetList.PathHumanReadable(); wxString path = m_SheetList.PathHumanReadable();
...@@ -114,8 +114,10 @@ void NETLIST_OBJECT::Show( std::ostream& out, int ndx ) ...@@ -114,8 +114,10 @@ void NETLIST_OBJECT::Show( std::ostream& out, int ndx )
switch( m_Type ) switch( m_Type )
{ {
case NET_PIN: case NET_PIN:
/* GetRef() needs to be const
out << " <refOfComp>" << ((SCH_COMPONENT*)m_Link)->GetRef(&m_SheetList).mb_str() out << " <refOfComp>" << ((SCH_COMPONENT*)m_Link)->GetRef(&m_SheetList).mb_str()
<< "</refOfComp>\n"; << "</refOfComp>\n";
*/
if( m_Comp ) if( m_Comp )
m_Comp->Show( 1, out ); m_Comp->Show( 1, out );
......
...@@ -142,7 +142,7 @@ public: ...@@ -142,7 +142,7 @@ public:
*/ */
#if defined(DEBUG) #if defined(DEBUG)
void Show( std::ostream& out, int ndx ); void Show( std::ostream& out, int ndx ) const; // override
#endif #endif
NETLIST_OBJECT(); NETLIST_OBJECT();
......
...@@ -416,6 +416,10 @@ public: ...@@ -416,6 +416,10 @@ public:
FILL_T GetFillMode() const { return m_Fill; } FILL_T GetFillMode() const { return m_Fill; }
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
protected: protected:
/** /**
......
...@@ -2163,7 +2163,7 @@ bool LIB_PIN::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* ...@@ -2163,7 +2163,7 @@ bool LIB_PIN::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint*
#if defined(DEBUG) #if defined(DEBUG)
void LIB_PIN::Show( int nestLevel, std::ostream& os ) void LIB_PIN::Show( int nestLevel, std::ostream& os ) const
{ {
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str()
<< " num=\"" << GetNumberString().mb_str() << " num=\"" << GetNumberString().mb_str()
......
...@@ -134,7 +134,7 @@ public: ...@@ -134,7 +134,7 @@ public:
} }
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ); // virtual override void Show( int nestLevel, std::ostream& os ) const; // virtual override
#endif #endif
/** /**
......
...@@ -123,7 +123,7 @@ bool LIB_TEXT::Load( LINE_READER& aLineReader, wxString& errorMsg ) ...@@ -123,7 +123,7 @@ bool LIB_TEXT::Load( LINE_READER& aLineReader, wxString& errorMsg )
} }
else else
{ {
cnt = sscanf( line + 2, "%d %d %d %d %d %d %d %s %s %d %c %c", cnt = sscanf( line + 2, "%lf %d %d %d %d %d %d %s %s %d %c %c",
&angle, &m_Pos.x, &m_Pos.y, &m_Size.x, &m_Attributs, &angle, &m_Pos.x, &m_Pos.y, &m_Size.x, &m_Attributs,
&m_Unit, &m_Convert, buf, tmp, &thickness, &hjustify, &m_Unit, &m_Convert, buf, tmp, &thickness, &hjustify,
&vjustify ); &vjustify );
......
...@@ -251,7 +251,7 @@ bool SCH_BITMAP::IsSelectStateChanged( const wxRect& aRect ) ...@@ -251,7 +251,7 @@ bool SCH_BITMAP::IsSelectStateChanged( const wxRect& aRect )
#if defined(DEBUG) #if defined(DEBUG)
void SCH_BITMAP::Show( int nestLevel, std::ostream& os ) void SCH_BITMAP::Show( int nestLevel, std::ostream& os ) const
{ {
// XML output: // XML output:
wxString s = GetClass(); wxString s = GetClass();
......
...@@ -161,7 +161,7 @@ public: ...@@ -161,7 +161,7 @@ public:
virtual BITMAP_DEF GetMenuImage() const { return image_xpm; } virtual BITMAP_DEF GetMenuImage() const { return image_xpm; }
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ); void Show( int nestLevel, std::ostream& os ) const; // override
#endif #endif
private: private:
......
...@@ -148,6 +148,10 @@ public: ...@@ -148,6 +148,10 @@ public:
virtual BITMAP_DEF GetMenuImage() const { return add_entry_xpm; } virtual BITMAP_DEF GetMenuImage() const { return add_entry_xpm; }
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
private: private:
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const; virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const; virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
......
...@@ -380,7 +380,7 @@ void SCH_COMPONENT::AddHierarchicalReference( const wxString& aPath, ...@@ -380,7 +380,7 @@ void SCH_COMPONENT::AddHierarchicalReference( const wxString& aPath,
} }
wxString SCH_COMPONENT::GetPath( SCH_SHEET_PATH* sheet ) wxString SCH_COMPONENT::GetPath( const SCH_SHEET_PATH* sheet ) const
{ {
wxCHECK_MSG( sheet != NULL, wxEmptyString, wxCHECK_MSG( sheet != NULL, wxEmptyString,
wxT( "Cannot get component path with invalid sheet object." ) ); wxT( "Cannot get component path with invalid sheet object." ) );
...@@ -392,7 +392,7 @@ wxString SCH_COMPONENT::GetPath( SCH_SHEET_PATH* sheet ) ...@@ -392,7 +392,7 @@ wxString SCH_COMPONENT::GetPath( SCH_SHEET_PATH* sheet )
} }
const wxString SCH_COMPONENT::GetRef( SCH_SHEET_PATH* sheet ) const wxString SCH_COMPONENT::GetRef( const SCH_SHEET_PATH* sheet )
{ {
wxString path = GetPath( sheet ); wxString path = GetPath( sheet );
wxString h_path, h_ref; wxString h_path, h_ref;
...@@ -435,7 +435,7 @@ const wxString SCH_COMPONENT::GetRef( SCH_SHEET_PATH* sheet ) ...@@ -435,7 +435,7 @@ const wxString SCH_COMPONENT::GetRef( SCH_SHEET_PATH* sheet )
* i.e starts by letter * i.e starts by letter
* returns true if OK * returns true if OK
*/ */
bool SCH_COMPONENT::IsReferenceStringValid( const wxString & aReferenceString ) bool SCH_COMPONENT::IsReferenceStringValid( const wxString& aReferenceString )
{ {
wxString text = aReferenceString; wxString text = aReferenceString;
bool ok = true; bool ok = true;
...@@ -454,7 +454,7 @@ bool SCH_COMPONENT::IsReferenceStringValid( const wxString & aReferenceString ) ...@@ -454,7 +454,7 @@ bool SCH_COMPONENT::IsReferenceStringValid( const wxString & aReferenceString )
} }
void SCH_COMPONENT::SetRef( SCH_SHEET_PATH* sheet, const wxString& ref ) void SCH_COMPONENT::SetRef( const SCH_SHEET_PATH* sheet, const wxString& ref )
{ {
wxString path = GetPath( sheet ); wxString path = GetPath( sheet );
...@@ -929,7 +929,7 @@ wxPoint SCH_COMPONENT::GetScreenCoord( const wxPoint& aPoint ) ...@@ -929,7 +929,7 @@ wxPoint SCH_COMPONENT::GetScreenCoord( const wxPoint& aPoint )
#if defined(DEBUG) #if defined(DEBUG)
void SCH_COMPONENT::Show( int nestLevel, std::ostream& os ) void SCH_COMPONENT::Show( int nestLevel, std::ostream& os ) const
{ {
// for now, make it look like XML: // for now, make it look like XML:
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str()
......
...@@ -287,7 +287,7 @@ public: ...@@ -287,7 +287,7 @@ public:
virtual void SwapData( SCH_ITEM* aItem ); virtual void SwapData( SCH_ITEM* aItem );
// returns a unique ID, in the form of a path. // returns a unique ID, in the form of a path.
wxString GetPath( SCH_SHEET_PATH* sheet ); wxString GetPath( const SCH_SHEET_PATH* sheet ) const;
/** /**
* Function IsReferenceStringValid (static) * Function IsReferenceStringValid (static)
...@@ -297,18 +297,18 @@ public: ...@@ -297,18 +297,18 @@ public:
* @param aReferenceString = the reference string to validate * @param aReferenceString = the reference string to validate
* @return true if OK * @return true if OK
*/ */
static bool IsReferenceStringValid( const wxString &aReferenceString ); static bool IsReferenceStringValid( const wxString& aReferenceString );
/** /**
* Function GetRef * Function GetRef
* returns the reference, for the given sheet path. * returns the reference, for the given sheet path.
*/ */
const wxString GetRef( SCH_SHEET_PATH* sheet ); const wxString GetRef( const SCH_SHEET_PATH* sheet );
/** /**
* Set the reference, for the given sheet path. * Set the reference, for the given sheet path.
*/ */
void SetRef( SCH_SHEET_PATH* sheet, const wxString& ref ); void SetRef( const SCH_SHEET_PATH* sheet, const wxString& ref );
/** /**
* Function AddHierarchicalReference * Function AddHierarchicalReference
...@@ -407,16 +407,7 @@ public: ...@@ -407,16 +407,7 @@ public:
virtual bool IsReplaceable() const { return true; } virtual bool IsReplaceable() const { return true; }
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; // override
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void Show( int nestLevel, std::ostream& os );
#endif #endif
private: private:
......
...@@ -219,6 +219,10 @@ public: ...@@ -219,6 +219,10 @@ public:
*/ */
virtual bool IsReplaceable() const { return true; } virtual bool IsReplaceable() const { return true; }
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
private: private:
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const; virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const; virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
......
...@@ -203,7 +203,7 @@ void SCH_JUNCTION::GetNetListItem( vector<NETLIST_OBJECT*>& aNetListItems, ...@@ -203,7 +203,7 @@ void SCH_JUNCTION::GetNetListItem( vector<NETLIST_OBJECT*>& aNetListItems,
#if defined(DEBUG) #if defined(DEBUG)
void SCH_JUNCTION::Show( int nestLevel, std::ostream& os ) void SCH_JUNCTION::Show( int nestLevel, std::ostream& os ) const
{ {
// XML output: // XML output:
wxString s = GetClass(); wxString s = GetClass();
......
...@@ -122,7 +122,7 @@ public: ...@@ -122,7 +122,7 @@ public:
SCH_SHEET_PATH* aSheetPath ); SCH_SHEET_PATH* aSheetPath );
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ); void Show( int nestLevel, std::ostream& os ) const; // override
#endif #endif
private: private:
......
...@@ -173,7 +173,7 @@ public: ...@@ -173,7 +173,7 @@ public:
virtual bool operator <( const SCH_ITEM& aItem ) const; virtual bool operator <( const SCH_ITEM& aItem ) const;
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; void Show( int nestLevel, std::ostream& os ) const; // override
#endif #endif
private: private:
......
...@@ -63,14 +63,7 @@ EDA_ITEM* SCH_MARKER::doClone() const ...@@ -63,14 +63,7 @@ EDA_ITEM* SCH_MARKER::doClone() const
#if defined(DEBUG) #if defined(DEBUG)
/** void SCH_MARKER::Show( int nestLevel, std::ostream& os ) const
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void SCH_MARKER::Show( int nestLevel, std::ostream& os )
{ {
// for now, make it look like XML: // for now, make it look like XML:
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str()
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
* @brief SCH_MARKER class definition. * @brief SCH_MARKER class definition.
*/ */
#ifndef _TYPE_SCH_MARKER_H_ #ifndef TYPE_SCH_MARKER_H_
#define _TYPE_SCH_MARKER_H_ #define TYPE_SCH_MARKER_H_
#include "sch_item_struct.h" #include "sch_item_struct.h"
#include "class_marker_base.h" #include "class_marker_base.h"
...@@ -128,8 +128,7 @@ public: ...@@ -128,8 +128,7 @@ public:
virtual BITMAP_DEF GetMenuImage() const { return erc_xpm; } virtual BITMAP_DEF GetMenuImage() const { return erc_xpm; }
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ); void Show( int nestLevel, std::ostream& os ) const; // override
#endif #endif
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const; virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
...@@ -138,4 +137,4 @@ public: ...@@ -138,4 +137,4 @@ public:
virtual void doSetPosition( const wxPoint& aPosition ) { m_Pos = aPosition; } virtual void doSetPosition( const wxPoint& aPosition ) { m_Pos = aPosition; }
}; };
#endif /* _TYPE_SCH_MARKER_H_ */ #endif // TYPE_SCH_MARKER_H_
...@@ -126,6 +126,10 @@ public: ...@@ -126,6 +126,10 @@ public:
virtual void GetNetListItem( vector<NETLIST_OBJECT*>& aNetListItems, virtual void GetNetListItem( vector<NETLIST_OBJECT*>& aNetListItems,
SCH_SHEET_PATH* aSheetPath ); SCH_SHEET_PATH* aSheetPath );
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
private: private:
virtual bool doIsConnected( const wxPoint& aPosition ) const; virtual bool doIsConnected( const wxPoint& aPosition ) const;
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const; virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
......
...@@ -154,6 +154,10 @@ public: ...@@ -154,6 +154,10 @@ public:
return m_points[ aIndex ]; return m_points[ aIndex ];
} }
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
private: private:
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const; virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const; virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
......
...@@ -1207,7 +1207,7 @@ void SCH_SHEET::doPlot( PLOTTER* aPlotter ) ...@@ -1207,7 +1207,7 @@ void SCH_SHEET::doPlot( PLOTTER* aPlotter )
#if defined(DEBUG) #if defined(DEBUG)
void SCH_SHEET::Show( int nestLevel, std::ostream& os ) void SCH_SHEET::Show( int nestLevel, std::ostream& os ) const
{ {
// XML output: // XML output:
wxString s = GetClass(); wxString s = GetClass();
...@@ -1216,7 +1216,7 @@ void SCH_SHEET::Show( int nestLevel, std::ostream& os ) ...@@ -1216,7 +1216,7 @@ void SCH_SHEET::Show( int nestLevel, std::ostream& os )
<< TO_UTF8( m_name ) << '"' << ">\n"; << TO_UTF8( m_name ) << '"' << ">\n";
// show all the pins, and check the linked list integrity // show all the pins, and check the linked list integrity
BOOST_FOREACH( SCH_SHEET_PIN& label, m_pins ) BOOST_FOREACH( const SCH_SHEET_PIN& label, m_pins )
{ {
label.Show( nestLevel + 1, os ); label.Show( nestLevel + 1, os );
} }
......
...@@ -170,10 +170,7 @@ public: ...@@ -170,10 +170,7 @@ public:
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg ); virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; // override
// comment inherited by Doxygen from Base_Struct
void Show( int nestLevel, std::ostream& os );
#endif #endif
/** /**
...@@ -633,10 +630,7 @@ public: ...@@ -633,10 +630,7 @@ public:
SCH_SHEET_PATH* aSheetPath ); SCH_SHEET_PATH* aSheetPath );
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; // override
// comment inherited by Doxygen from Base_Struct
void Show( int nestLevel, std::ostream& os );
#endif #endif
protected: protected:
......
...@@ -531,7 +531,7 @@ bool SCH_SHEET_PIN::doHitTest( const wxPoint& aPoint, int aAccuracy ) const ...@@ -531,7 +531,7 @@ bool SCH_SHEET_PIN::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
#if defined(DEBUG) #if defined(DEBUG)
void SCH_SHEET_PIN::Show( int nestLevel, std::ostream& os ) void SCH_SHEET_PIN::Show( int nestLevel, std::ostream& os ) const
{ {
// XML output: // XML output:
wxString s = GetClass(); wxString s = GetClass();
......
...@@ -732,7 +732,7 @@ void SCH_TEXT::doPlot( PLOTTER* aPlotter ) ...@@ -732,7 +732,7 @@ void SCH_TEXT::doPlot( PLOTTER* aPlotter )
#if defined(DEBUG) #if defined(DEBUG)
void SCH_TEXT::Show( int nestLevel, std::ostream& os ) void SCH_TEXT::Show( int nestLevel, std::ostream& os ) const
{ {
// XML output: // XML output:
wxString s = GetClass(); wxString s = GetClass();
......
...@@ -239,7 +239,7 @@ public: ...@@ -239,7 +239,7 @@ public:
SCH_SHEET_PATH* aSheetPath ); SCH_SHEET_PATH* aSheetPath );
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ); void Show( int nestLevel, std::ostream& os ) const; // override
#endif #endif
private: private:
......
...@@ -633,7 +633,7 @@ bool GERBER_DRAW_ITEM::HitTest( EDA_RECT& aRefArea ) ...@@ -633,7 +633,7 @@ bool GERBER_DRAW_ITEM::HitTest( EDA_RECT& aRefArea )
#if defined(DEBUG) #if defined(DEBUG)
void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os ) void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os ) const
{ {
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
......
...@@ -270,7 +270,6 @@ public: ...@@ -270,7 +270,6 @@ public:
return wxT( "GERBER_DRAW_ITEM" ); return wxT( "GERBER_DRAW_ITEM" );
} }
/** /**
* Function Save. * Function Save.
* currently: no nothing, but must be defined to meet requirements * currently: no nothing, but must be defined to meet requirements
...@@ -279,17 +278,9 @@ public: ...@@ -279,17 +278,9 @@ public:
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; // override
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
virtual void Show( int nestLevel, std::ostream& os );
#endif #endif
}; };
#endif /* CLASS_GERBER_DRAW_ITEM_H */ #endif /* CLASS_GERBER_DRAW_ITEM_H */
...@@ -705,8 +705,10 @@ public: ...@@ -705,8 +705,10 @@ public:
* of nesting of this object within the overall tree. * of nesting of this object within the overall tree.
* @param os The ostream& to output to. * @param os The ostream& to output to.
*/ */
virtual void Show( int nestLevel, std::ostream& os ) const; virtual void Show( int nestLevel, std::ostream& os ) const = 0;
// pure virtual so compiler warns if somebody mucks up a derived declaration
void ShowDummy( std::ostream& os ) const; ///< call this if you are a lazy developer
/** /**
* Function NestedSpace * Function NestedSpace
......
...@@ -143,6 +143,10 @@ public: ...@@ -143,6 +143,10 @@ public:
* and clears the selected item list. * and clears the selected item list.
*/ */
void Clear(); void Clear();
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const {} // override
#endif
}; };
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
* @brief BASE_SCREEN class implementation. * @brief BASE_SCREEN class implementation.
*/ */
#ifndef __CLASS_BASE_SCREEN_H__ #ifndef CLASS_BASE_SCREEN_H_
#define __CLASS_BASE_SCREEN_H__ #define CLASS_BASE_SCREEN_H_
#include "base_struct.h" #include "base_struct.h"
#include "class_undoredo_container.h" #include "class_undoredo_container.h"
...@@ -469,18 +469,9 @@ public: ...@@ -469,18 +469,9 @@ public:
} }
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; // overload
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void Show( int nestLevel, std::ostream& os );
#endif #endif
}; };
#endif /* #ifndef __CLASS_BASE_SCREEN_H__ */ #endif // CLASS_BASE_SCREEN_H_
...@@ -2150,57 +2150,46 @@ TRACK* BOARD::CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS ...@@ -2150,57 +2150,46 @@ TRACK* BOARD::CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS
#if defined(DEBUG) #if defined(DEBUG)
void BOARD::Show( int nestLevel, std::ostream& os ) void BOARD::Show( int nestLevel, std::ostream& os ) const
{ {
BOARD_ITEM* p; BOARD_ITEM* p;
// for now, make it look like XML: // for now, make it look like XML:
NestedSpace( nestLevel, NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << ">\n";
os ) << '<' << GetClass().Lower().mb_str() << ">\n";
// specialization of the output: // specialization of the output:
NestedSpace( nestLevel + 1, os ) << "<modules>\n"; NestedSpace( nestLevel + 1, os ) << "<modules>\n";
p = m_Modules; p = m_Modules;
for( ; p; p = p->Next() ) for( ; p; p = p->Next() )
p->Show( nestLevel + 2, os ); p->Show( nestLevel + 2, os );
NestedSpace( nestLevel + 1, os ) << "</modules>\n"; NestedSpace( nestLevel + 1, os ) << "</modules>\n";
NestedSpace( nestLevel + 1, os ) << "<pdrawings>\n"; NestedSpace( nestLevel + 1, os ) << "<pdrawings>\n";
p = m_Drawings; p = m_Drawings;
for( ; p; p = p->Next() ) for( ; p; p = p->Next() )
p->Show( nestLevel + 2, os ); p->Show( nestLevel + 2, os );
NestedSpace( nestLevel + 1, os ) << "</pdrawings>\n"; NestedSpace( nestLevel + 1, os ) << "</pdrawings>\n";
NestedSpace( nestLevel + 1, os ) << "<tracks>\n"; NestedSpace( nestLevel + 1, os ) << "<tracks>\n";
p = m_Track; p = m_Track;
for( ; p; p = p->Next() ) for( ; p; p = p->Next() )
p->Show( nestLevel + 2, os ); p->Show( nestLevel + 2, os );
NestedSpace( nestLevel + 1, os ) << "</tracks>\n"; NestedSpace( nestLevel + 1, os ) << "</tracks>\n";
NestedSpace( nestLevel + 1, os ) << "<zones>\n"; NestedSpace( nestLevel + 1, os ) << "<zones>\n";
p = m_Zone; p = m_Zone;
for( ; p; p = p->Next() ) for( ; p; p = p->Next() )
p->Show( nestLevel + 2, os ); p->Show( nestLevel + 2, os );
NestedSpace( nestLevel + 1, os ) << "</zones>\n"; NestedSpace( nestLevel + 1, os ) << "</zones>\n";
/* NestedSpace( nestLevel+1, os ) << "<zone_containers>\n";
* NestedSpace( nestLevel+1, os ) << "<zone_container>\n"; for( ZONE_CONTAINERS::const_iterator it = m_ZoneDescriptorList.begin();
* for( ZONE_CONTAINERS::iterator i=m_ZoneDescriptorList.begin(); it != m_ZoneDescriptorList.end(); ++it )
* i!=m_ZoneDescriptorList.end(); ++i ) (*it)->Show( nestLevel+2, os );
* (*i)->Show( nestLevel+2, os );
* NestedSpace( nestLevel+1, os ) << "</zone_container>\n";
*/
p = (BOARD_ITEM*) m_Son; NestedSpace( nestLevel+1, os ) << "</zone_containers>\n";
p = (BOARD_ITEM*) m_Son;
for( ; p; p = p->Next() ) for( ; p; p = p->Next() )
{ {
p->Show( nestLevel + 1, os ); p->Show( nestLevel + 1, os );
......
...@@ -881,16 +881,7 @@ public: ...@@ -881,16 +881,7 @@ public:
} }
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; // overload
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void Show( int nestLevel, std::ostream& os );
#endif #endif
......
...@@ -155,6 +155,11 @@ public: ...@@ -155,6 +155,11 @@ public:
virtual wxString GetSelectMenuText() const; virtual wxString GetSelectMenuText() const;
virtual BITMAP_DEF GetMenuImage() const { return add_dimension_xpm; } virtual BITMAP_DEF GetMenuImage() const { return add_dimension_xpm; }
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
}; };
#endif // DIMENSION_H_ #endif // DIMENSION_H_
...@@ -501,14 +501,7 @@ wxString DRAWSEGMENT::GetSelectMenuText() const ...@@ -501,14 +501,7 @@ wxString DRAWSEGMENT::GetSelectMenuText() const
#if defined(DEBUG) #if defined(DEBUG)
/** void DRAWSEGMENT::Show( int nestLevel, std::ostream& os ) const
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void DRAWSEGMENT::Show( int nestLevel, std::ostream& os )
{ {
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
......
...@@ -245,7 +245,7 @@ public: ...@@ -245,7 +245,7 @@ public:
virtual BITMAP_DEF GetMenuImage() const { return add_dashed_line_xpm; } virtual BITMAP_DEF GetMenuImage() const { return add_dashed_line_xpm; }
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ); void Show( int nestLevel, std::ostream& os ) const; // overload
#endif #endif
}; };
......
...@@ -248,14 +248,7 @@ wxString EDGE_MODULE::GetSelectMenuText() const ...@@ -248,14 +248,7 @@ wxString EDGE_MODULE::GetSelectMenuText() const
#if defined(DEBUG) #if defined(DEBUG)
/** void EDGE_MODULE::Show( int nestLevel, std::ostream& os ) const
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void EDGE_MODULE::Show( int nestLevel, std::ostream& os )
{ {
wxString shape = ShowShape( (STROKE_T) m_Shape ); wxString shape = ShowShape( (STROKE_T) m_Shape );
......
...@@ -81,16 +81,7 @@ public: ...@@ -81,16 +81,7 @@ public:
virtual BITMAP_DEF GetMenuImage() const { return show_mod_edge_xpm; } virtual BITMAP_DEF GetMenuImage() const { return show_mod_edge_xpm; }
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; // overload
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
virtual void Show( int nestLevel, std::ostream& os );
#endif #endif
}; };
......
...@@ -118,7 +118,10 @@ public: ...@@ -118,7 +118,10 @@ public:
virtual wxString GetSelectMenuText() const; virtual wxString GetSelectMenuText() const;
virtual BITMAP_DEF GetMenuImage() const { return drc_xpm; } virtual BITMAP_DEF GetMenuImage() const { return drc_xpm; }
};
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
};
#endif // CLASS_MARKER_PCB_H #endif // CLASS_MARKER_PCB_H
...@@ -112,6 +112,10 @@ public: ...@@ -112,6 +112,10 @@ public:
virtual wxString GetSelectMenuText() const; virtual wxString GetSelectMenuText() const;
virtual BITMAP_DEF GetMenuImage() const { return add_mires_xpm; } virtual BITMAP_DEF GetMenuImage() const { return add_mires_xpm; }
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
}; };
......
...@@ -565,14 +565,7 @@ wxString MODULE::GetSelectMenuText() const ...@@ -565,14 +565,7 @@ wxString MODULE::GetSelectMenuText() const
#if defined(DEBUG) #if defined(DEBUG)
/** void MODULE::Show( int nestLevel, std::ostream& os ) const
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void MODULE::Show( int nestLevel, std::ostream& os )
{ {
BOARD* board = GetBoard(); BOARD* board = GetBoard();
......
...@@ -375,16 +375,7 @@ public: ...@@ -375,16 +375,7 @@ public:
virtual BITMAP_DEF GetMenuImage() const { return module_xpm; } virtual BITMAP_DEF GetMenuImage() const { return module_xpm; }
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; // overload
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
virtual void Show( int nestLevel, std::ostream& os );
#endif #endif
}; };
......
...@@ -263,7 +263,7 @@ void BOARD::SynchronizeNetsAndNetClasses() ...@@ -263,7 +263,7 @@ void BOARD::SynchronizeNetsAndNetClasses()
#if defined(DEBUG) #if defined(DEBUG)
void NETCLASS::Show( int nestLevel, std::ostream& os ) void NETCLASS::Show( int nestLevel, std::ostream& os ) const
{ {
// for now, make it look like XML: // for now, make it look like XML:
//NestedSpace( nestLevel, os ) //NestedSpace( nestLevel, os )
......
...@@ -213,16 +213,7 @@ public: ...@@ -213,16 +213,7 @@ public:
bool ReadDescr( LINE_READER* aReader ); bool ReadDescr( LINE_READER* aReader );
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; // overload
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void Show( int nestLevel, std::ostream& os );
#endif #endif
}; };
......
...@@ -721,14 +721,7 @@ wxString D_PAD::GetSelectMenuText() const ...@@ -721,14 +721,7 @@ wxString D_PAD::GetSelectMenuText() const
#if defined(DEBUG) #if defined(DEBUG)
/** void D_PAD::Show( int nestLevel, std::ostream& os ) const
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void D_PAD::Show( int nestLevel, std::ostream& os )
{ {
char padname[5] = { m_Padname[0], m_Padname[1], m_Padname[2], m_Padname[3], 0 }; char padname[5] = { m_Padname[0], m_Padname[1], m_Padname[2], m_Padname[3], 0 };
......
...@@ -447,16 +447,7 @@ public: ...@@ -447,16 +447,7 @@ public:
wxString ShowPadAttr() const; wxString ShowPadAttr() const;
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; // overload
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
virtual void Show( int nestLevel, std::ostream& os );
#endif #endif
}; };
......
...@@ -161,14 +161,7 @@ wxString TEXTE_PCB::GetSelectMenuText() const ...@@ -161,14 +161,7 @@ wxString TEXTE_PCB::GetSelectMenuText() const
#if defined(DEBUG) #if defined(DEBUG)
/** void TEXTE_PCB::Show( int nestLevel, std::ostream& os ) const
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void TEXTE_PCB::Show( int nestLevel, std::ostream& os )
{ {
// for now, make it look like XML: // for now, make it look like XML:
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
......
...@@ -138,14 +138,7 @@ public: ...@@ -138,14 +138,7 @@ public:
virtual EDA_RECT GetBoundingBox() const { return GetTextBox(); }; virtual EDA_RECT GetBoundingBox() const { return GetTextBox(); };
#if defined(DEBUG) #if defined(DEBUG)
/** void Show( int nestLevel, std::ostream& os ) const;
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
virtual void Show( int nestLevel, std::ostream& os );
#endif #endif
}; };
......
...@@ -454,14 +454,7 @@ wxString TEXTE_MODULE::GetSelectMenuText() const ...@@ -454,14 +454,7 @@ wxString TEXTE_MODULE::GetSelectMenuText() const
#if defined(DEBUG) #if defined(DEBUG)
/** void TEXTE_MODULE::Show( int nestLevel, std::ostream& os ) const
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void TEXTE_MODULE::Show( int nestLevel, std::ostream& os )
{ {
// for now, make it look like XML: // for now, make it look like XML:
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
...@@ -471,5 +464,4 @@ void TEXTE_MODULE::Show( int nestLevel, std::ostream& os ) ...@@ -471,5 +464,4 @@ void TEXTE_MODULE::Show( int nestLevel, std::ostream& os )
// << ">\n"; // << ">\n";
} }
#endif #endif
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
*/ */
#ifndef TEXT_MODULE_H #ifndef TEXT_MODULE_H_
#define TEXT_MODULE_H #define TEXT_MODULE_H_
#include "class_board_item.h" #include "class_board_item.h"
...@@ -188,17 +188,8 @@ public: ...@@ -188,17 +188,8 @@ public:
virtual BITMAP_DEF GetMenuImage() const { return footprint_text_xpm; } virtual BITMAP_DEF GetMenuImage() const { return footprint_text_xpm; }
#if defined(DEBUG) #if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const; // overload
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
virtual void Show( int nestLevel, std::ostream& os );
#endif #endif
}; };
#endif // TEXT_MODULE_H #endif // TEXT_MODULE_H_
...@@ -1569,7 +1569,7 @@ wxString TRACK::GetSelectMenuText() const ...@@ -1569,7 +1569,7 @@ wxString TRACK::GetSelectMenuText() const
#if defined(DEBUG) #if defined(DEBUG)
void TRACK::Show( int nestLevel, std::ostream& os ) void TRACK::Show( int nestLevel, std::ostream& os ) const
{ {
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
...@@ -1589,7 +1589,7 @@ void TRACK::Show( int nestLevel, std::ostream& os ) ...@@ -1589,7 +1589,7 @@ void TRACK::Show( int nestLevel, std::ostream& os )
} }
void SEGVIA::Show( int nestLevel, std::ostream& os ) void SEGVIA::Show( int nestLevel, std::ostream& os ) const
{ {
const char* cp; const char* cp;
......
...@@ -386,15 +386,7 @@ public: ...@@ -386,15 +386,7 @@ public:
#if defined (DEBUG) #if defined (DEBUG)
/** void Show( int nestLevel, std::ostream& os ) const; // overload
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void Show( int nestLevel, std::ostream& os );
/** /**
* Function ShowState * Function ShowState
...@@ -497,16 +489,7 @@ public: ...@@ -497,16 +489,7 @@ public:
virtual BITMAP_DEF GetMenuImage() const { return via_sketch_xpm; } virtual BITMAP_DEF GetMenuImage() const { return via_sketch_xpm; }
#if defined (DEBUG) #if defined (DEBUG)
void Show( int nestLevel, std::ostream& os ) const; // overload
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void Show( int nestLevel, std::ostream& os );
#endif #endif
}; };
......
...@@ -496,6 +496,10 @@ public: ...@@ -496,6 +496,10 @@ public:
virtual wxString GetSelectMenuText() const; virtual wxString GetSelectMenuText() const;
virtual BITMAP_DEF GetMenuImage() const { return add_zone_xpm; } virtual BITMAP_DEF GetMenuImage() const { return add_zone_xpm; }
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
}; };
......
...@@ -446,8 +446,21 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF ...@@ -446,8 +446,21 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
} }
} }
#if !defined(USE_NEW_PCBNEW_SAVE) #if defined(USE_NEW_PCBNEW_SAVE)
try
{
IO_MGR::Save( IO_MGR::KICAD, pcbFileName.GetFullPath(), GetBoard(), NULL );
}
catch( IO_ERROR ioe )
{
wxString msg = wxString::Format( _( "Error loading board.\n%s" ),
ioe.errorText.GetData() );
wxMessageBox( msg, _( "Save Board File" ), wxICON_ERROR );
saveok = false;
}
#else
// Create the file // Create the file
FILE* dest; FILE* dest;
dest = wxFopen( pcbFileName.GetFullPath(), wxT( "wt" ) ); dest = wxFopen( pcbFileName.GetFullPath(), wxT( "wt" ) );
...@@ -468,22 +481,6 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF ...@@ -468,22 +481,6 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
fclose( dest ); fclose( dest );
} }
#else
try
{
IO_MGR::Save( IO_MGR::KICAD, pcbFileName.GetFullPath(), GetBoard(), NULL ); // overload
}
catch( IO_ERROR ioe )
{
wxString msg = wxString::Format( _( "Error loading board.\n%s" ),
ioe.errorText.GetData() );
wxMessageBox( msg, _( "Save Board File" ), wxICON_ERROR );
saveok = false;
}
#endif #endif
/* Display the file names: */ /* Display the file names: */
......
...@@ -191,6 +191,9 @@ BOARD* KICAD_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, PROPER ...@@ -191,6 +191,9 @@ BOARD* KICAD_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, PROPER
m_reader = &reader; // member function accessibility m_reader = &reader; // member function accessibility
m_board->m_Status_Pcb = 0;
m_board->m_NetClasses.Clear();
init( aProperties ); init( aProperties );
checkVersion(); checkVersion();
...@@ -2567,9 +2570,6 @@ void KICAD_PLUGIN::init( PROPERTIES* aProperties ) ...@@ -2567,9 +2570,6 @@ void KICAD_PLUGIN::init( PROPERTIES* aProperties )
#else #else
diskToBiu = 1.0; // BIUs are deci-mils diskToBiu = 1.0; // BIUs are deci-mils
#endif #endif
m_board->m_Status_Pcb = 0;
m_board->m_NetClasses.Clear();
} }
......
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