From 6a3384e76463dac9b3fac53560852a48a245efb2 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Tue, 13 Oct 2020 19:16:36 -0400 Subject: [PATCH] Properly set up new boards when creating from the command line Fixes https://gitlab.com/kicad/code/kicad/-/issues/5913 --- pcbnew/files.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 22bed0f1db..3025917ade 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -599,6 +599,11 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in if( is_new ) { + // Link the existing blank board to the new project + GetBoard()->SetProject( &Prj() ); + + GetBoard()->SetFileName( fullFileName ); + OnModify(); } else