Eeschema: move update all screen references from SCH_SHEET_PATH to SCH_SHEET.

* Uncouple SCH_COMPONENT::GetRef() from  SCH_SHEET_PATH and use SCH_SHEET
  instead.
* Uncouple SCH_COMPONENT::GetUnitSelection() from  SCH_SHEET_PATH and use
  SCH_SHEET instead.
* Fix all calls to GetRef() and GetUnitSelection() to pass a pointer to the
  appropriate SCH_SHEET object instead of an SCH_SHEET_PATH object.
This commit is contained in:
Wayne Stambaugh
2016-01-06 19:07:30 -05:00
parent f76c9376e0
commit e8e0a75b8c
29 changed files with 106 additions and 101 deletions
+4 -3
View File
@@ -34,6 +34,7 @@
#include <schframe.h>
#include <base_units.h>
#include <libeditframe.h>
#include <sch_sheet.h>
#include <sch_sheet_path.h>
#include <project.h>
#include <reporter.h>
@@ -67,7 +68,7 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) )
{
m_parent->SetCurrentSheet( list );
m_parent->GetCurrentSheet().UpdateAllScreenReferences();
m_parent->GetCurrentSheet().Last()->UpdateAllScreenReferences();
m_parent->SetSheetNumberAndCount();
screen = m_parent->GetCurrentSheet().LastScreen();
}
@@ -109,14 +110,14 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
reporter.Report( msg, REPORTER::RPT_ERROR );
m_parent->SetCurrentSheet( oldsheetpath );
m_parent->GetCurrentSheet().UpdateAllScreenReferences();
m_parent->GetCurrentSheet().Last()->UpdateAllScreenReferences();
m_parent->SetSheetNumberAndCount();
return;
}
}
m_parent->SetCurrentSheet( oldsheetpath );
m_parent->GetCurrentSheet().UpdateAllScreenReferences();
m_parent->GetCurrentSheet().Last()->UpdateAllScreenReferences();
m_parent->SetSheetNumberAndCount();
}
else // Print current sheet