diff --git a/common/project/project_local_settings.cpp b/common/project/project_local_settings.cpp index c363d10fd6..8dbfb837c5 100644 --- a/common/project/project_local_settings.cpp +++ b/common/project/project_local_settings.cpp @@ -83,7 +83,7 @@ PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS( PROJECT* aProject, const wxStrin { if( !aVal.is_array() || aVal.empty() ) { - m_VisibleItems = GAL_SET::DefaultVisible(); + m_VisibleItems |= UserVisbilityLayers(); return; } @@ -439,7 +439,7 @@ PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS( PROJECT* aProject, const wxStrin if( Contains( ptr ) ) { - if( At( ptr ).is_array() ) + if( At( ptr ).is_array() && !At( ptr ).empty() ) At( ptr ).push_back( LAYER_FILLED_SHAPES - GAL_LAYER_ID_START ); else At( "board" ).erase( "visible_items" ); diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp index 17fd4c0e44..a14f51caa9 100644 --- a/pcbnew/board.cpp +++ b/pcbnew/board.cpp @@ -891,7 +891,7 @@ void BOARD::SetVisibleAlls() GAL_SET BOARD::GetVisibleElements() const { - return m_project ? m_project->GetLocalSettings().m_VisibleItems : GAL_SET().set(); + return m_project ? m_project->GetLocalSettings().m_VisibleItems : GAL_SET::DefaultVisible(); }