Don't force callers of GetAppSettings to implement exception processing.

This commit is contained in:
Jeff Young
2025-06-14 20:25:59 +01:00
parent 5ed332771c
commit 18e107529a
112 changed files with 1189 additions and 1565 deletions
+7 -6
View File
@@ -509,13 +509,14 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
frame->HideSolderMask();
}
PCBNEW_SETTINGS* settings = Pgm().GetSettingsManager().GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" );
if( !staleRuleAreas.empty() && ( settings->m_Display.m_TrackClearance == SHOW_WITH_VIA_ALWAYS
|| settings->m_Display.m_PadClearance ) )
if( PCBNEW_SETTINGS* cfg = GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" ) )
{
if( view )
view->UpdateCollidingItems( staleRuleAreas, { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T, PCB_PAD_T } );
if( !staleRuleAreas.empty() && ( cfg->m_Display.m_TrackClearance == SHOW_WITH_VIA_ALWAYS
|| cfg->m_Display.m_PadClearance ) )
{
if( view )
view->UpdateCollidingItems( staleRuleAreas, { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T, PCB_PAD_T } );
}
}
if( !staleTeardropPadsAndVias.empty() || !staleTeardropTracks.empty() )