From 0201cb4e7e3eba737d15e2857ebc2e160880b318 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 3 Jul 2020 10:43:23 -0400 Subject: [PATCH] Fix schematic reload in standalone mode --- eeschema/files-io.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 2c83e0fe4b..a3a99d3c4c 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -284,8 +284,10 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in if( differentProject ) { GetSettingsManager()->SaveProject(); + Schematic().SetProject( nullptr ); GetSettingsManager()->UnloadProject( &Prj() ); GetSettingsManager()->LoadProject( pro.GetFullPath() ); + CreateScreens(); } if( schFileType == SCH_IO_MGR::SCH_LEGACY ) @@ -313,8 +315,6 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in Prj().SetElem( PROJECT::ELEM_SYMBOL_LIB_TABLE, NULL ); Prj().SchSymbolLibTable(); - Schematic().SetProject( &Prj() ); - // Load project settings after schematic has been set up with the project link, since this will // update some of the needed schematic settings such as drawing defaults LoadProjectSettings();