From 5ba2a08366c2dfdc3e7f392576832c43bc8b2ef0 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 7 Mar 2019 06:00:15 -0800 Subject: [PATCH] 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 --- pcbnew/pcb_edit_frame.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 24a34d68a5..97db1e4703 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -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 ); }