Eeschema, worksheet view: fix missing initialisation of sheet count and sheet number

Fixes: lp:1803637
https://bugs.launchpad.net/kicad/+bug/1803637
This commit is contained in:
jean-pierre charras 2018-11-16 09:36:10 +01:00
parent ffe4b745dd
commit acf696ca2d
2 changed files with 8 additions and 5 deletions

View File

@ -52,14 +52,17 @@ SCH_VIEW::~SCH_VIEW()
}
void SCH_VIEW::DisplaySheet( SCH_SCREEN *aSheet )
void SCH_VIEW::DisplaySheet( SCH_SCREEN *aScreen )
{
for( auto item = aSheet->GetDrawItems(); item; item = item->Next() )
for( auto item = aScreen->GetDrawItems(); item; item = item->Next() )
Add( item );
m_worksheet.reset( new KIGFX::WORKSHEET_VIEWITEM( 1, &aSheet->GetPageSettings(),
&aSheet->GetTitleBlock() ) );
m_worksheet.reset( new KIGFX::WORKSHEET_VIEWITEM( 1, &aScreen->GetPageSettings(),
&aScreen->GetTitleBlock() ) );
m_worksheet->SetSheetNumber( aScreen->m_ScreenNumber );
m_worksheet->SetSheetCount( aScreen->m_NumberOfScreens );
m_selectionArea.reset( new KIGFX::PREVIEW::SELECTION_AREA( ) );
m_preview.reset( new KIGFX::VIEW_GROUP () );

View File

@ -72,7 +72,7 @@ public:
~SCH_VIEW();
void DisplaySheet( SCH_SHEET *aSheet );
void DisplaySheet( SCH_SCREEN *aSheet );
void DisplaySheet( SCH_SCREEN *aScreen );
void DisplayComponent( LIB_PART *aPart );
KIGFX::PREVIEW::SELECTION_AREA* GetSelectionArea() const { return m_selectionArea.get(); }