Fix loading netclasses from legacy boards via Python

This commit is contained in:
Jon Evans 2021-12-07 18:55:08 -05:00
parent 9c619d8f4e
commit 63f67b7e5b
1 changed files with 5 additions and 0 deletions

View File

@ -47,6 +47,8 @@
#include <macros.h>
#include <pcbnew_scripting_helpers.h>
#include <project.h>
#include <project/net_settings.h>
#include <project/project_file.h>
#include <settings/settings_manager.h>
#include <specctra.h>
#include <project/project_local_settings.h>
@ -158,6 +160,9 @@ BOARD* LoadBoard( wxString& aFileName, IO_MGR::PCB_FILE_T aFormat )
{
brd->SetProject( project );
if( brd->m_LegacyDesignSettingsLoaded )
project->GetProjectFile().NetSettings().RebuildNetClassAssignments();
// Move legacy view settings to local project settings
if( !brd->m_LegacyVisibleLayers.test( Rescue ) )
project->GetLocalSettings().m_VisibleLayers = brd->m_LegacyVisibleLayers;