7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-20 15:51:41 +00:00

clear itemByIdCache in IncrementTimestamp

This commit is contained in:
Quentin Freimanis 2025-03-26 21:56:49 -07:00 committed by Jon Evans
parent 8076bfa3c7
commit 78b6ca8256

View File

@ -263,7 +263,8 @@ void BOARD::IncrementTimeStamp()
|| !m_LayerExpressionCache.empty()
|| !m_ZoneBBoxCache.empty()
|| m_CopperItemRTreeCache
|| m_maxClearanceValue.has_value() )
|| m_maxClearanceValue.has_value()
|| !m_itemByIdCache.empty() )
{
std::unique_lock<std::shared_mutex> writeLock( m_CachesMutex );
@ -288,6 +289,8 @@ void BOARD::IncrementTimeStamp()
m_CopperZoneRTreeCache.clear();
m_maxClearanceValue.reset();
m_itemByIdCache.clear();
}
}
@ -1469,7 +1472,6 @@ void BOARD::DeleteAllFootprints()
{
for( FOOTPRINT* footprint : m_footprints )
{
m_itemByIdCache.erase( footprint->m_Uuid );
delete footprint;
}
@ -1482,7 +1484,6 @@ void BOARD::DetachAllFootprints()
{
for( FOOTPRINT* footprint : m_footprints )
{
m_itemByIdCache.erase( footprint->m_Uuid );
footprint->SetParent( nullptr );
}