From 791d2293d3652e3f8c88498035ef468c5e8576ec Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 7 Jan 2020 09:29:49 +0100 Subject: [PATCH] Added ReloadSong() to reload a song from disk --- VocaluxeLib/Songs/CSong.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/Songs/CSong.cs b/VocaluxeLib/Songs/CSong.cs index e6ddaf4d..8a63b605 100644 --- a/VocaluxeLib/Songs/CSong.cs +++ b/VocaluxeLib/Songs/CSong.cs @@ -288,6 +288,14 @@ namespace VocaluxeLib.Songs return loader.ReadNotes(); } + public bool ReloadSong() + { + var loader = new CSongLoader(this); + bool retValue = loader.ReadHeader(); + retValue = loader.ReadNotes(true); + return retValue; + } + public bool Save() { return Save(Path.Combine(Folder, FileName)); @@ -518,4 +526,4 @@ namespace VocaluxeLib.Songs ShortEnd.Source = EDataSource.Calculated; } } -} \ No newline at end of file +}