Undo commit -r6541.

This commit is contained in:
Wayne Stambaugh 2016-02-15 15:10:57 -05:00
parent 8931df339e
commit ee23342e31
3 changed files with 7 additions and 31 deletions

View File

@ -327,7 +327,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
Zoom_Automatique( false );
SetSheetNumberAndCount();
g_RootSheet->SetPageNumbers();
m_canvas->Refresh( true );
return true;

View File

@ -56,7 +56,6 @@ SCH_SHEET::SCH_SHEET( const wxPoint& pos ) :
m_screen = NULL;
m_name.Printf( wxT( "Sheet%8.8lX" ), (long) m_TimeStamp );
m_fileName.Printf( wxT( "file%8.8lX.sch" ), (long) m_TimeStamp );
m_number = 1;
}
@ -73,7 +72,6 @@ SCH_SHEET::SCH_SHEET( const SCH_SHEET& aSheet ) :
m_name = aSheet.m_name;
m_fileName = aSheet.m_fileName;
m_pins = aSheet.m_pins;
m_number = aSheet.m_number;
for( size_t i = 0; i < m_pins.size(); i++ )
m_pins[i].SetParent( this );
@ -184,6 +182,11 @@ bool SCH_SHEET::Load( LINE_READER& aLine, wxString& aErrorMsg )
SCH_SHEET_PIN* sheetPin;
char* ptcar;
if( IsRootSheet() )
m_number = 1;
else
m_number = GetRootSheet()->CountSheets();
SetTimeStamp( GetNewTimeStamp() );
// sheets are added to the GetDrawItems() like other schematic components.
@ -1163,21 +1166,6 @@ void SCH_SHEET::Plot( PLOTTER* aPlotter )
}
void SCH_SHEET::SetPageNumbers()
{
int pageNumber = 1;
std::vector< const SCH_SHEET* > sheets;
GetRootSheet()->GetSheets( sheets );
for( unsigned i = 0; i < sheets.size(); i++ )
{
const_cast< SCH_SHEET* >( sheets[i] )->m_number = pageNumber;
pageNumber += 1;
}
}
SCH_SHEET* SCH_SHEET::FindSheetByName( const wxString& aSheetName )
{
std::vector< const SCH_SHEET* > sheets;

View File

@ -610,18 +610,6 @@ public:
EDA_ITEM* Clone() const;
/**
* Function SetPageNumbers
*
* sets the page numbers for each sheet by load order.
*
* The root sheet is always used to set the page numbers no matter which sheet this
* function is called. This function will only have meaning when loading legacy
* schematics. The upcoming s-expression schematic file format will allow for user
* defined page numbers.
*/
void SetPageNumbers();
/**
* Function FindSheetByName
*