Only modify visibility checkboxes for layers with them

This commit is contained in:
Ian McInerney 2024-06-29 03:05:57 +01:00
parent f2ab07c8b4
commit c8ebcc8e0f
1 changed files with 3 additions and 1 deletions

View File

@ -1283,7 +1283,9 @@ void APPEARANCE_CONTROLS::SetObjectVisible( GAL_LAYER_ID aLayer, bool isVisible
if( m_objectSettingsMap.count( aLayer ) )
{
APPEARANCE_SETTING* setting = m_objectSettingsMap.at( aLayer );
setting->ctl_visibility->SetValue( isVisible );
if( setting->can_control_visibility )
setting->ctl_visibility->SetValue( isVisible );
}
m_frame->GetBoard()->SetElementVisibility( aLayer, isVisible );