Fix several annoying edit mode bugs, mostly by fixing the Song copy
operator and the various uses of it. - revert file from disk: keeps old BPM. The BPMS on disk are added to the existing BPM information! - edit mode turns X stepcharts into 2X when reverting - sometimes edit mode loses an entire stepchart: open a stepchart, change to a new stepchart, exit without going back, original chart gone - edit a chart, make a change in a different chart, exit from the first chart: change made in different chart doesn't revert - normally, when you create a stepchart and don't save it after editting it, it is deleted. however, if you create a stepchart, don't save it, and exit edit mode while looking at a different chart, the chart isn't deleted. Some existing bugs are not fixed, though: - delete the last stepchart for a step type. CTD. - Edit one of the fake doubles stepcharts for a song that doesn't have real doubles stepcharts. Exit without doing anything. CTD. This is probably the same problem as the previous bug. - delete a song or a steps that happens to be part of a trail. Trail is now broken. Some other edits should affect a trail as well, but don't.
This commit is contained in:
@@ -235,7 +235,7 @@ void SongManager::LoadStepManiaSongDir( RString sDir, LoadingWindow *ld )
|
||||
ld->Paint();
|
||||
}
|
||||
Song* pNewSong = new Song;
|
||||
if( !pNewSong->LoadFromSongDir( sSongDirName ) )
|
||||
if( !pNewSong->LoadFromSongDir( sSongDirName, false ) ) // don't ignore cache
|
||||
{
|
||||
/* The song failed to load. */
|
||||
delete pNewSong;
|
||||
@@ -277,7 +277,7 @@ void SongManager::LoadGroupSymLinks(RString sDir, RString sGroupFolder)
|
||||
RString sSymDestination = msdF.GetParam(0,1); // Should only be 1 vale¶m...period.
|
||||
|
||||
Song* pNewSong = new Song;
|
||||
if( !pNewSong->LoadFromSongDir( sSymDestination ) )
|
||||
if( !pNewSong->LoadFromSongDir( sSymDestination, false ) ) // don't ignore cache
|
||||
{
|
||||
delete pNewSong; // The song failed to load.
|
||||
}
|
||||
@@ -993,7 +993,7 @@ void SongManager::RevertFromDisk( Song *pSong, bool bAllowNotesLoss )
|
||||
pSong->Reset();
|
||||
const bool OldVal = PREFSMAN->m_bFastLoad;
|
||||
PREFSMAN->m_bFastLoad.Set( false );
|
||||
pSong->LoadFromSongDir( dir );
|
||||
pSong->LoadFromSongDir( dir, true ); // when reverting, ignore cache
|
||||
/* XXX: reload edits? */
|
||||
PREFSMAN->m_bFastLoad.Set( OldVal );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user