mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Don't bypass empty visibility recovery due to migration
In some situations, loading a project in 8.0 would wipe the object visibility settings but the local settings also require a format migration. The migrator was adding visibility for the shapes layer in this situation, bypassing the recovery from having no objects visible.
This commit is contained in:
parent
d928a2a0e3
commit
81ea108d8c
@ -83,7 +83,7 @@ PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS( PROJECT* aProject, const wxStrin
|
|||||||
{
|
{
|
||||||
if( !aVal.is_array() || aVal.empty() )
|
if( !aVal.is_array() || aVal.empty() )
|
||||||
{
|
{
|
||||||
m_VisibleItems = GAL_SET::DefaultVisible();
|
m_VisibleItems |= UserVisbilityLayers();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,7 +439,7 @@ PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS( PROJECT* aProject, const wxStrin
|
|||||||
|
|
||||||
if( Contains( ptr ) )
|
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 );
|
At( ptr ).push_back( LAYER_FILLED_SHAPES - GAL_LAYER_ID_START );
|
||||||
else
|
else
|
||||||
At( "board" ).erase( "visible_items" );
|
At( "board" ).erase( "visible_items" );
|
||||||
|
@ -891,7 +891,7 @@ void BOARD::SetVisibleAlls()
|
|||||||
|
|
||||||
GAL_SET BOARD::GetVisibleElements() const
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user