Smarten the UpdateAllItemsConditionally() tests in SetActiveLayer().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15329
This commit is contained in:
Jeff Young 2023-09-15 17:43:43 +01:00
parent ca0b103b54
commit 5842e9c57e
1 changed files with 11 additions and 0 deletions

View File

@ -1407,11 +1407,22 @@ void PCB_EDIT_FRAME::SetActiveLayer( PCB_LAYER_ID aLayer )
{
return KIGFX::REPAINT;
}
if( via->GetRemoveUnconnected() )
return KIGFX::ALL;
// Clearances could be layer-dependent so redraw them when the active layer
// is changed
if( GetPcbNewSettings()->m_Display.m_TrackClearance == SHOW_WITH_VIA_ALWAYS )
return KIGFX::REPAINT;
}
else if( item->Type() == PCB_PAD_T )
{
PAD* pad = static_cast<PAD*>( item );
if( pad->GetRemoveUnconnected() )
return KIGFX::ALL;
// Clearances could be layer-dependent so redraw them when the active layer
// is changed
if( GetPcbNewSettings()->m_Display.m_PadClearance )