While flags are in prefs, actual clearance values are in board setup.

Fixes https://gitlab.com/kicad/code/kicad/issues/10852

(cherry picked from commit 7ddd3137a3)
This commit is contained in:
Jeff Young 2022-02-15 21:59:46 +00:00
parent 7f40cac4b0
commit 2b7c79541b
1 changed files with 18 additions and 2 deletions

View File

@ -990,8 +990,24 @@ void PCB_EDIT_FRAME::ShowBoardSetupDialog( const wxString& aInitialPage )
GetCanvas()->GetView()->UpdateAllItemsConditionally( KIGFX::REPAINT,
[&]( KIGFX::VIEW_ITEM* aItem ) -> bool
{
if( dynamic_cast<EDA_TEXT*>( aItem ) )
return true; // text variables
if( dynamic_cast<PCB_TRACK*>( aItem ) )
{
if( GetDisplayOptions().m_DisplayPadClearance )
return true; // clearance values
}
else if( dynamic_cast<PAD*>( aItem ) )
{
if( GetDisplayOptions().m_ShowTrackClearanceMode
== PCB_DISPLAY_OPTIONS::SHOW_TRACK_CLEARANCE_WITH_VIA_ALWAYS )
{
return true; // clearance values
}
}
else if( dynamic_cast<EDA_TEXT*>( aItem ) )
{
if( dynamic_cast<EDA_TEXT*>( aItem )->HasTextVars() )
return true; // text variables
}
return false;
} );