diff --git a/Vocaluxe/GameModes/CGameMode.cs b/Vocaluxe/GameModes/CGameMode.cs index 6dfe5ca5..2560e98d 100644 --- a/Vocaluxe/GameModes/CGameMode.cs +++ b/Vocaluxe/GameModes/CGameMode.cs @@ -247,7 +247,8 @@ namespace Vocaluxe.GameModes { if (_CurrentSong >= 0 && _CurrentSong < _SongQueque.Count) { - CSong song = CSongs.GetSong(_SongQueque[_CurrentSong].SongID); + CSong song = (CSong)CSongs.GetSong(_SongQueque[_CurrentSong].SongID).Clone(); + song.Notes = (CNotes)CSongs.GetSong(_SongQueque[_CurrentSong].SongID).Notes.Clone(); switch (GetCurrentGameMode()) { diff --git a/Vocaluxe/Lib/Song/CNotes.cs b/Vocaluxe/Lib/Song/CNotes.cs index d38dc820..ad33380a 100644 --- a/Vocaluxe/Lib/Song/CNotes.cs +++ b/Vocaluxe/Lib/Song/CNotes.cs @@ -6,7 +6,7 @@ using Vocaluxe.Base; namespace Vocaluxe.Lib.Song { - class CNotes + class CNotes : ICloneable { private List _Lines = new List(); @@ -79,6 +79,11 @@ namespace Vocaluxe.Lib.Song lines.SetMedley(StartBeat, EndBeat); } } + + public object Clone() + { + return base.MemberwiseClone(); + } } public enum ENoteType @@ -549,6 +554,7 @@ namespace Vocaluxe.Lib.Song updateMinMaxBeat(note); } } + #endregion Methods } diff --git a/Vocaluxe/Lib/Song/CSong.cs b/Vocaluxe/Lib/Song/CSong.cs index 2cb63c36..22a24fa0 100644 --- a/Vocaluxe/Lib/Song/CSong.cs +++ b/Vocaluxe/Lib/Song/CSong.cs @@ -48,7 +48,7 @@ namespace Vocaluxe.Lib.Song } } - class CSong + class CSong : ICloneable { private bool _CoverLoaded = false; private bool _NotesLoaded = false; @@ -980,5 +980,10 @@ namespace Vocaluxe.Lib.Song ShortEnd = stop; } + + public object Clone() + { + return base.MemberwiseClone(); + } } }