Fix schematic reload in standalone mode

This commit is contained in:
Jon Evans 2020-07-03 10:43:23 -04:00
parent a210fd570f
commit 0201cb4e7e
1 changed files with 2 additions and 2 deletions

View File

@ -284,8 +284,10 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& 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<wxString>& 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();