Changed Song and ScreenEdit to not save a .sm file when split timing is used.

This commit is contained in:
Kyzentun Keeslala
2015-10-02 16:26:59 -06:00
parent 751caba360
commit 2d64694f14
6 changed files with 48 additions and 6 deletions
+19 -2
View File
@@ -1157,7 +1157,12 @@ void Song::Save(bool autosave)
return;
}
SaveToCacheFile();
SaveToSMFile();
// If one of the charts uses split timing, then it cannot be accurately
// saved in the .sm format. So saving the .sm is disabled.
if(!AnyChartUsesSplitTiming())
{
SaveToSMFile();
}
//SaveToDWIFile();
/* We've safely written our files and created backups. Rename non-SM and
@@ -1884,6 +1889,18 @@ bool Song::IsStepsUsingDifferentTiming(Steps *pSteps) const
return !pSteps->m_Timing.empty();
}
bool Song::AnyChartUsesSplitTiming() const
{
FOREACH_CONST(Steps*, m_vpSteps, s)
{
if(!(*s)->m_Timing.empty())
{
return true;
}
}
return false;
}
bool Song::HasSignificantBpmChangesOrStops() const
{
if( m_SongTiming.HasStops() || m_SongTiming.HasDelays() )
@@ -2377,4 +2394,4 @@ LUA_REGISTER_CLASS( Song )
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
*/