Invalidate trail caches for edit courses on unlocks.
This commit is contained in:
@@ -811,6 +811,17 @@ void SongManager::DeleteCourse( Course *pCourse )
|
|||||||
RefreshCourseGroupInfo();
|
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
|
/* Called periodically to wipe out cached NoteData. This is called when we change
|
||||||
* screens. */
|
* screens. */
|
||||||
void SongManager::Cleanup()
|
void SongManager::Cleanup()
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
void FreeCourses();
|
void FreeCourses();
|
||||||
void AddCourse( Course *pCourse ); // transfers ownership of pCourse
|
void AddCourse( Course *pCourse ); // transfers ownership of pCourse
|
||||||
void DeleteCourse( 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 InitAll( LoadingWindow *ld ); // songs, courses, groups - everything.
|
||||||
void Reload( bool bAllowFastLoad, LoadingWindow *ld=NULL ); // songs, courses, groups - everything.
|
void Reload( bool bAllowFastLoad, LoadingWindow *ld=NULL ); // songs, courses, groups - everything.
|
||||||
|
|||||||
@@ -593,6 +593,7 @@ void UnlockManager::UnlockEntryID( RString sEntryID )
|
|||||||
PROFILEMAN->GetProfile(pn)->m_UnlockedEntryIDs.insert( sEntryID );
|
PROFILEMAN->GetProfile(pn)->m_UnlockedEntryIDs.insert( sEntryID );
|
||||||
|
|
||||||
PROFILEMAN->GetMachineProfile()->m_UnlockedEntryIDs.insert( sEntryID );
|
PROFILEMAN->GetMachineProfile()->m_UnlockedEntryIDs.insert( sEntryID );
|
||||||
|
SONGMAN->InvalidateCachedTrails();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnlockManager::UnlockEntryIndex( int iEntryIndex )
|
void UnlockManager::UnlockEntryIndex( int iEntryIndex )
|
||||||
|
|||||||
Reference in New Issue
Block a user