Code formatting for 013f7b4d
This commit is contained in:
parent
34b52c91b7
commit
ac9fc949bd
|
@ -36,6 +36,9 @@
|
|||
#include <worksheet_dataitem.h>
|
||||
#include <page_layout_reader_lexer.h>
|
||||
|
||||
#include <wx/file.h>
|
||||
#include <wx/mstream.h>
|
||||
|
||||
|
||||
using namespace TB_READER_T;
|
||||
|
||||
|
@ -330,7 +333,7 @@ void PAGE_LAYOUT_READER_PARSER::parsePolyOutline( WORKSHEET_DATAITEM_POLYPOLYGON
|
|||
}
|
||||
}
|
||||
|
||||
#include <wx/mstream.h>
|
||||
|
||||
void PAGE_LAYOUT_READER_PARSER::parseBitmap( WORKSHEET_DATAITEM_BITMAP * aItem )
|
||||
{
|
||||
T token;
|
||||
|
@ -766,7 +769,7 @@ void WORKSHEET_LAYOUT::SetDefaultLayout()
|
|||
// Returns defaultPageLayout as a string;
|
||||
wxString WORKSHEET_LAYOUT::DefaultLayout()
|
||||
{
|
||||
return wxString(defaultPageLayout);
|
||||
return wxString( defaultPageLayout );
|
||||
}
|
||||
|
||||
// emptyPageLayout is a "empty" page layout description
|
||||
|
@ -780,17 +783,13 @@ void WORKSHEET_LAYOUT::SetEmptyLayout()
|
|||
SetPageLayout( emptyPageLayout, false, wxT( "empty page" ) );
|
||||
}
|
||||
|
||||
// Returns emptyPageLayout as a string;
|
||||
|
||||
wxString WORKSHEET_LAYOUT::EmptyLayout()
|
||||
{
|
||||
return wxString(emptyPageLayout);
|
||||
return wxString( emptyPageLayout );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Populates the list from a S expr description stored in a string
|
||||
* @param aPageLayout = the S expr string
|
||||
*/
|
||||
void WORKSHEET_LAYOUT::SetPageLayout( const char* aPageLayout, bool Append, const wxString& aSource )
|
||||
{
|
||||
if( ! Append )
|
||||
|
@ -808,12 +807,7 @@ void WORKSHEET_LAYOUT::SetPageLayout( const char* aPageLayout, bool Append, cons
|
|||
}
|
||||
}
|
||||
|
||||
#include <wx/file.h>
|
||||
|
||||
// SetLayout() try to load the aFullFileName custom layout file,
|
||||
// if aFullFileName is empty, try the filename defined by the
|
||||
// environment variable KICAD_WKSFILE (a *.kicad_wks filename).
|
||||
// if does not exists, loads the default page layout.
|
||||
void WORKSHEET_LAYOUT::SetPageLayout( const wxString& aFullFileName, bool Append )
|
||||
{
|
||||
wxString fullFileName = aFullFileName;
|
||||
|
|
|
@ -425,12 +425,15 @@ SCH_SHEET* SCH_EAGLE_PLUGIN::Load( const wxString& aFileName, KIWAY* aKiway,
|
|||
|
||||
m_pi->SaveLibrary( getLibFileName().GetFullPath() );
|
||||
|
||||
// Eagle sheets do not use a worksheet frame by default
|
||||
WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
|
||||
pglayout.SetEmptyLayout( );
|
||||
pglayout.SetEmptyLayout();
|
||||
|
||||
wxFileName layoutfn( m_kiway->Prj().GetProjectPath(), "empty.kicad_wks");
|
||||
wxFileName layoutfn( m_kiway->Prj().GetProjectPath(), "empty.kicad_wks" );
|
||||
wxFile layoutfile;
|
||||
if( layoutfile.Create( layoutfn.GetFullPath() ) ) {
|
||||
|
||||
if( layoutfile.Create( layoutfn.GetFullPath() ) )
|
||||
{
|
||||
layoutfile.Write( WORKSHEET_LAYOUT::EmptyLayout() );
|
||||
layoutfile.Close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue