Fix loading netclasses from legacy boards via Python
This commit is contained in:
parent
9c619d8f4e
commit
63f67b7e5b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue