use empty TimingData in Steps to signify fallback on Song timing.

This required using the new Steps::GetTimingData function and the allowEmpty
parameter to TimingData::TidyUpData when appropriate, as well as clearing the
TimingData to remove step timing rather than coping the song timing over it.

Fixes some odd editor behavior when changing song timing, and is overall a
slightly less hacky way of doing things.
This commit is contained in:
Devin J. Pohly
2013-01-23 14:51:18 -05:00
parent 0ae7b0da85
commit ce507b9800
18 changed files with 66 additions and 46 deletions
+3 -2
View File
@@ -369,8 +369,9 @@ static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCa
lines.push_back( ssprintf( "#CREDIT:%s;", SmEscape(in.GetCredit()).c_str() ) );
// XXX: Is there a better way to write this?
if (const_cast<TimingData &>(song.m_SongTiming) != in.m_Timing)
// If the Steps TimingData is not empty, then they have their own
// timing. Write out the corresponding tags.
if( !in.m_Timing.empty() )
{
lines.push_back( ssprintf( "#OFFSET:%.f;", in.m_Timing.m_fBeat0OffsetInSeconds ) );
GetTimingTags( lines, in.m_Timing );