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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user