let SpeedSegment scale itself.

also fixes the bug where the segments outside of the scaling region are scaled too.
This commit is contained in:
Thai Pangsakulyanont
2011-07-01 22:40:57 +07:00
parent 25ffddeb70
commit 9a1a824f22
3 changed files with 17 additions and 6 deletions
+1 -6
View File
@@ -1332,12 +1332,7 @@ void TimingData::ScaleRegion( float fScale, int iStartIndex, int iEndIndex, bool
m_LabelSegments[i].Scale( iStartIndex, length, newLength );
for ( unsigned i = 0; i < m_SpeedSegments.size(); i++ )
{
SpeedSegment &s = m_SpeedSegments[i];
s.Scale( iStartIndex, length, newLength );
if (s.GetUnit() == 0) // beats
s.SetLength(s.GetLength() * fScale);
}
m_SpeedSegments[i].Scale( iStartIndex, length, newLength );
for( unsigned i = 0; i < m_FakeSegments.size(); i++ )
m_FakeSegments[i].Scale( iStartIndex, length, newLength );