Browse Source

Remove delay profile cache check only used on board load

revert-0c36e162
JamesJCode 8 months ago
parent
commit
8229d2e915
  1. 3
      pcbnew/files.cpp
  2. 5
      pcbnew/length_delay_calculation/time_domain_parameters_user_defined.cpp
  3. 3
      pcbnew/length_delay_calculation/time_domain_parameters_user_defined.h

3
pcbnew/files.cpp

@ -956,6 +956,9 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
// Initialise caches used by component classes
GetBoard()->GetComponentClassManager().RebuildRequiredCaches();
// Initialise time domain tuning caches
GetBoard()->GetLengthCalculation()->SynchronizeTimeDomainProperties();
// Syncs the UI (appearance panel, etc) with the loaded board and project
onBoardLoaded();

5
pcbnew/length_delay_calculation/time_domain_parameters_user_defined.cpp

@ -118,9 +118,6 @@ int64_t TIME_DOMAIN_PARAMETERS_USER_DEFINED::getPropagationDelay( const LENGTH_D
const DELAY_PROFILE* TIME_DOMAIN_PARAMETERS_USER_DEFINED::GetDelayProfile( const wxString& aDelayProfileName )
{
if( !m_cachesInitialised ) [[unlikely]]
rebuildCaches();
auto itr = m_delayProfilesCache.find( aDelayProfileName );
if( itr != m_delayProfilesCache.end() )
@ -183,6 +180,4 @@ void TIME_DOMAIN_PARAMETERS_USER_DEFINED::rebuildCaches()
}
}
}
m_cachesInitialised = true;
}

3
pcbnew/length_delay_calculation/time_domain_parameters_user_defined.h

@ -137,9 +137,6 @@ private:
/// Cached per-tuning profile via overrides
std::map<wxString, std::map<VIA_OVERRIDE_CACHE_KEY, int64_t>> m_viaOverridesCache;
/// Used to ensure caches are valid when board first loaded
bool m_cachesInitialised{ false };
};
#endif //PCB_NEW_TIME_DOMAIN_PARAMETERS_USER_DEFINED_H
Loading…
Cancel
Save