Fix SongManager::Invalidate. Call it from places it is needed:

ScreenEdit::RevertFromDisk, ScreenEdit's Save routine, and
ScreenEditMenu's Delete Steps routine.  This fixes the bug where
deleting a step chart sometimes causes interesting behavior
but usually just causes a CTD next time you run Oni mode.  It also makes
sure data precalculated from the songs is correctly recalculated when
ScreenEdit changes a song.
This commit is contained in:
John Bauer
2006-11-13 17:07:42 +00:00
parent cf34d741ec
commit e15285ab55
4 changed files with 33 additions and 104 deletions
+18 -9
View File
@@ -192,24 +192,33 @@ RString Course::GetCacheFilePath() const
void Course::Init()
{
m_bIsAutogen = false;
m_bRepeat = false;
m_bShuffle = false;
m_iLives = -1;
m_bSortByMeter = false;
m_vEntries.clear();
FOREACH_Difficulty(dc)
m_iCustomMeter[dc] = -1;
m_vEntries.clear();
m_sPath = "";
m_sGroupName = "";
m_sMainTitle = "";
m_sMainTitleTranslit = "";
m_sSubTitle = "";
m_sSubTitleTranslit = "";
m_sBannerPath = "";
m_sCDTitlePath = "";
m_sGroupName = "";
m_bRepeat = false;
m_bShuffle = false;
m_iLives = -1;
FOREACH_Difficulty(dc)
m_iCustomMeter[dc] = -1;
m_bSortByMeter = false;
m_vEntries.clear();
m_SortOrder_TotalDifficulty = 0;
m_SortOrder_Ranking = 0;
m_LoadedFromProfile = ProfileSlot_Invalid;
m_TrailCache.clear();
m_iTrailCacheSeed = 0;
m_RadarCache.clear();
}
bool Course::IsPlayableIn( StepsType st ) const