Do not invalidate board caches during DRC
Footprints now modify their parent container when destroyed due to
26542796
, and a temporary footprint is created during DRC
in some situations. This can lead to board caches being messed
with during DRC which can cause unpredictable bad effects due to
multithreading.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13844
This commit is contained in:
parent
1215a967e2
commit
8440d7258b
|
@ -355,7 +355,13 @@ bool FOOTPRINT::FootprintNeedsUpdate( const FOOTPRINT* aLibFootprint )
|
|||
std::unique_ptr<FOOTPRINT> temp( static_cast<FOOTPRINT*>( Clone() ) );
|
||||
temp->Flip( {0,0}, false );
|
||||
temp->SetParentGroup( nullptr );
|
||||
return temp->FootprintNeedsUpdate( aLibFootprint );
|
||||
|
||||
bool needsUpdate = temp->FootprintNeedsUpdate( aLibFootprint );
|
||||
|
||||
// This temporary footprint must not have a parent when it goes out of scope because it must
|
||||
// not trigger then IncrementTimestamp call in ~FOOTPRINT.
|
||||
temp->SetParent( nullptr );
|
||||
return needsUpdate;
|
||||
}
|
||||
|
||||
TEST( GetDescription(), aLibFootprint->GetDescription() );
|
||||
|
|
Loading…
Reference in New Issue