Correctly resolve textVar refs in worksheet items in ERC.
Also fixes a null-ptr bug in DRC. Fixes https://gitlab.com/kicad/code/kicad/issues/5506
This commit is contained in:
parent
08dee31d9e
commit
5e9ec82642
|
@ -157,6 +157,12 @@ void ERC_TESTER::TestTextVars( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet )
|
|||
if( aWorksheet )
|
||||
{
|
||||
wsItems.SetMilsToIUfactor( IU_PER_MILS );
|
||||
wsItems.SetSheetNumber( 1 );
|
||||
wsItems.SetSheetCount( 1 );
|
||||
wsItems.SetFileName( "dummyFilename" );
|
||||
wsItems.SetSheetName( "dummySheet" );
|
||||
wsItems.SetSheetLayer( "dummyLayer" );
|
||||
wsItems.SetProject( &m_schematic->Prj() );
|
||||
wsItems.BuildWorkSheetGraphicList( aWorksheet->GetPageInfo(), aWorksheet->GetTitleBlock() );
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,10 @@ void DIALOG_DRC::OnDRCItemSelected( wxDataViewEvent& aEvent )
|
|||
BOARD_ITEM* c = board->GetItem( rc_item->GetAuxItem2ID() );
|
||||
BOARD_ITEM* d = board->GetItem( rc_item->GetAuxItem3ID() );
|
||||
|
||||
LSET violationLayers = a->GetLayerSet();
|
||||
LSET violationLayers;
|
||||
|
||||
if( a )
|
||||
violationLayers &= a->GetLayerSet();
|
||||
|
||||
if( b )
|
||||
violationLayers &= b->GetLayerSet();
|
||||
|
|
Loading…
Reference in New Issue