Undo commit -r6541.
This commit is contained in:
parent
8931df339e
commit
ee23342e31
|
@ -327,7 +327,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||||
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
|
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
|
||||||
Zoom_Automatique( false );
|
Zoom_Automatique( false );
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
g_RootSheet->SetPageNumbers();
|
|
||||||
m_canvas->Refresh( true );
|
m_canvas->Refresh( true );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -56,7 +56,6 @@ SCH_SHEET::SCH_SHEET( const wxPoint& pos ) :
|
||||||
m_screen = NULL;
|
m_screen = NULL;
|
||||||
m_name.Printf( wxT( "Sheet%8.8lX" ), (long) m_TimeStamp );
|
m_name.Printf( wxT( "Sheet%8.8lX" ), (long) m_TimeStamp );
|
||||||
m_fileName.Printf( wxT( "file%8.8lX.sch" ), (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_name = aSheet.m_name;
|
||||||
m_fileName = aSheet.m_fileName;
|
m_fileName = aSheet.m_fileName;
|
||||||
m_pins = aSheet.m_pins;
|
m_pins = aSheet.m_pins;
|
||||||
m_number = aSheet.m_number;
|
|
||||||
|
|
||||||
for( size_t i = 0; i < m_pins.size(); i++ )
|
for( size_t i = 0; i < m_pins.size(); i++ )
|
||||||
m_pins[i].SetParent( this );
|
m_pins[i].SetParent( this );
|
||||||
|
@ -184,6 +182,11 @@ bool SCH_SHEET::Load( LINE_READER& aLine, wxString& aErrorMsg )
|
||||||
SCH_SHEET_PIN* sheetPin;
|
SCH_SHEET_PIN* sheetPin;
|
||||||
char* ptcar;
|
char* ptcar;
|
||||||
|
|
||||||
|
if( IsRootSheet() )
|
||||||
|
m_number = 1;
|
||||||
|
else
|
||||||
|
m_number = GetRootSheet()->CountSheets();
|
||||||
|
|
||||||
SetTimeStamp( GetNewTimeStamp() );
|
SetTimeStamp( GetNewTimeStamp() );
|
||||||
|
|
||||||
// sheets are added to the GetDrawItems() like other schematic components.
|
// 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 )
|
SCH_SHEET* SCH_SHEET::FindSheetByName( const wxString& aSheetName )
|
||||||
{
|
{
|
||||||
std::vector< const SCH_SHEET* > sheets;
|
std::vector< const SCH_SHEET* > sheets;
|
||||||
|
@ -1187,7 +1175,7 @@ SCH_SHEET* SCH_SHEET::FindSheetByName( const wxString& aSheetName )
|
||||||
for( unsigned i = 0; i < sheets.size(); i++ )
|
for( unsigned i = 0; i < sheets.size(); i++ )
|
||||||
{
|
{
|
||||||
if( sheets[i]->GetName().CmpNoCase( aSheetName ) == 0 )
|
if( sheets[i]->GetName().CmpNoCase( aSheetName ) == 0 )
|
||||||
return const_cast< SCH_SHEET* >( sheets[i] );
|
return const_cast< SCH_SHEET*>( sheets[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -610,18 +610,6 @@ public:
|
||||||
|
|
||||||
EDA_ITEM* Clone() const;
|
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
|
* Function FindSheetByName
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue