Schematic: correctly resolve SHEETNAME for root sheet
This commit is contained in:
parent
d1aa49e1c9
commit
58cc0e2d1e
|
@ -260,6 +260,9 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
{
|
||||
wxBusyCursor busy;
|
||||
Schematic().SetRoot( pi->LoadSchematicFile( fullFileName, &Schematic() ) );
|
||||
// Make ${SHEETNAME} work on the root sheet until we properly support
|
||||
// naming the root sheet
|
||||
Schematic().Root().SetName( _( "Root" ) );
|
||||
}
|
||||
|
||||
if( !pi->GetError().IsEmpty() )
|
||||
|
|
|
@ -180,10 +180,7 @@ void SCH_PLOTTER::createPDFFile( const SCH_PLOT_SETTINGS& aPlotSettings,
|
|||
// Open the plotter and do the first page
|
||||
setupPlotPagePDF( plotter, screen, aPlotSettings );
|
||||
|
||||
if( sheetList.size() > 1 )
|
||||
plotter->StartPlot( sheetList[i].GetPageNumber(), _( "Root" ) );
|
||||
else
|
||||
plotter->StartPlot( sheetList[i].GetPageNumber(), sheetName );
|
||||
plotter->StartPlot( sheetList[i].GetPageNumber(), sheetName );
|
||||
}
|
||||
catch( const IO_ERROR& e )
|
||||
{
|
||||
|
|
|
@ -317,7 +317,7 @@ wxString HIERARCHY_PANE::getRootString()
|
|||
SCH_SHEET_PATH rootPath;
|
||||
rootPath.push_back( rootSheet );
|
||||
|
||||
return formatPageString ( _( "Root" ), rootPath.GetPageNumber() );
|
||||
return formatPageString( rootSheet->GetShownName( false ), rootPath.GetPageNumber() );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue