pcbnew: Set filename in Page Layout template

pcbnew refreshes the viewItem for the worksheet multiple times.  This
requires setting the filename to get parameters displayed on the
worksheet correctly.

Fixes: lp:1819000
* https://bugs.launchpad.net/kicad/+bug/1819000
This commit is contained in:
Seth Hillbrand 2019-03-07 06:00:15 -08:00
parent 200ff1cda6
commit 5ba2a08366
1 changed files with 3 additions and 0 deletions

View File

@ -518,6 +518,9 @@ void PCB_EDIT_FRAME::SetPageSettings( const PAGE_INFO& aPageSettings )
worksheet->SetSheetCount( screen->m_NumberOfScreens );
}
if( auto board = GetBoard() )
worksheet->SetFileName( TO_UTF8( board->GetFileName() ) );
// PCB_DRAW_PANEL_GAL takes ownership of the worksheet
drawPanel->SetWorksheet( worksheet );
}