Invalidate trail caches for edit courses on unlocks.

This commit is contained in:
Steve Checkoway
2006-06-12 10:49:44 +00:00
parent 2ea4cb1ead
commit 47e7ba3657
3 changed files with 13 additions and 1 deletions
+11
View File
@@ -811,6 +811,17 @@ void SongManager::DeleteCourse( Course *pCourse )
RefreshCourseGroupInfo();
}
void SongManager::InvalidateCachedTrails()
{
FOREACH_CONST( Course *, m_pCourses, pCourse )
{
const Course &c = **pCourse;
if( c.IsAnEdit() )
c.m_TrailCache.clear();
}
}
/* Called periodically to wipe out cached NoteData. This is called when we change
* screens. */
void SongManager::Cleanup()
+1 -1
View File
@@ -50,7 +50,7 @@ public:
void FreeCourses();
void AddCourse( Course *pCourse ); // transfers ownership of pCourse
void DeleteCourse( Course *pCourse ); // transfers ownership of pCourse
void InvalidateCachedTrails();
void InitAll( LoadingWindow *ld ); // songs, courses, groups - everything.
void Reload( bool bAllowFastLoad, LoadingWindow *ld=NULL ); // songs, courses, groups - everything.
+1
View File
@@ -593,6 +593,7 @@ void UnlockManager::UnlockEntryID( RString sEntryID )
PROFILEMAN->GetProfile(pn)->m_UnlockedEntryIDs.insert( sEntryID );
PROFILEMAN->GetMachineProfile()->m_UnlockedEntryIDs.insert( sEntryID );
SONGMAN->InvalidateCachedTrails();
}
void UnlockManager::UnlockEntryIndex( int iEntryIndex )