Eeschema: SCH_SHEET_PATH refactor.
* Derive SCH_SHEET_PATH from std::vector< SCH_SHEET* > and remove unnecessary assignment operator and list management functions. * Remove function BuildSheetPathInfoFromSheetPathValue() since it was effectively an assignment operation. * Replace all calls to BuildSheetPathInfoFromSheetPathValue() with assignment operator. * Replace list management functions with vector management functions. * Fix a error message that wasn't translatable.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2010 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -62,18 +62,11 @@ void DIALOG_PLOT_SCHEMATIC::createPSFile( bool aPlotAll, bool aPlotFrameRef )
|
||||
if( sheetpath == NULL )
|
||||
break;
|
||||
|
||||
list.Clear();
|
||||
|
||||
if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) )
|
||||
{
|
||||
m_parent->SetCurrentSheet( list );
|
||||
m_parent->GetCurrentSheet().UpdateAllScreenReferences();
|
||||
m_parent->SetSheetNumberAndCount();
|
||||
screen = m_parent->GetCurrentSheet().LastScreen();
|
||||
}
|
||||
else // Should not happen
|
||||
return;
|
||||
|
||||
list = *sheetpath;
|
||||
m_parent->SetCurrentSheet( list );
|
||||
m_parent->GetCurrentSheet().UpdateAllScreenReferences();
|
||||
m_parent->SetSheetNumberAndCount();
|
||||
screen = m_parent->GetCurrentSheet().LastScreen();
|
||||
sheetpath = SheetList.GetNext();
|
||||
}
|
||||
|
||||
@@ -125,7 +118,8 @@ void DIALOG_PLOT_SCHEMATIC::createPSFile( bool aPlotAll, bool aPlotFrameRef )
|
||||
else
|
||||
{
|
||||
// Error
|
||||
msg.Printf( _( "Unable to create file '%s'.\n" ), GetChars( plotFileName.GetFullPath() ) );
|
||||
msg.Printf( _( "Unable to create file '%s'.\n" ),
|
||||
GetChars( plotFileName.GetFullPath() ) );
|
||||
reporter.Report( msg, REPORTER::RPT_ERROR );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user