Remove DRC exclusions that no longer have items.
Fixes https://gitlab.com/kicad/code/kicad/issues/13802
This commit is contained in:
parent
7bc79c17d4
commit
13391176ae
|
@ -316,6 +316,20 @@ std::vector<PCB_MARKER*> BOARD::ResolveDRCExclusions()
|
||||||
{
|
{
|
||||||
PCB_MARKER* marker = PCB_MARKER::Deserialize( exclusionData );
|
PCB_MARKER* marker = PCB_MARKER::Deserialize( exclusionData );
|
||||||
|
|
||||||
|
if( !marker )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Check to see if items still exist
|
||||||
|
for( const KIID& guid : marker->GetRCItem()->GetIDs() )
|
||||||
|
{
|
||||||
|
if( GetItem( guid ) == DELETED_BOARD_ITEM::GetInstance() )
|
||||||
|
{
|
||||||
|
delete marker;
|
||||||
|
marker = nullptr;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( marker )
|
if( marker )
|
||||||
{
|
{
|
||||||
marker->SetExcluded( true );
|
marker->SetExcluded( true );
|
||||||
|
|
|
@ -987,10 +987,7 @@ void PCB_EDIT_FRAME::ResolveDRCExclusions()
|
||||||
for( PCB_MARKER* marker : GetBoard()->Markers() )
|
for( PCB_MARKER* marker : GetBoard()->Markers() )
|
||||||
{
|
{
|
||||||
if( marker->GetSeverity() == RPT_SEVERITY_EXCLUSION )
|
if( marker->GetSeverity() == RPT_SEVERITY_EXCLUSION )
|
||||||
{
|
GetCanvas()->GetView()->Update( marker );
|
||||||
GetCanvas()->GetView()->Remove( marker );
|
|
||||||
GetCanvas()->GetView()->Add( marker );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GetBoard()->UpdateRatsnestExclusions();
|
GetBoard()->UpdateRatsnestExclusions();
|
||||||
|
|
Loading…
Reference in New Issue