diff --git a/Switch_Toolbox_Library/Forms/Editors/Audio/AudioPlayerPanel.cs b/Switch_Toolbox_Library/Forms/Editors/Audio/AudioPlayerPanel.cs index 110bb794..0e2fe118 100644 --- a/Switch_Toolbox_Library/Forms/Editors/Audio/AudioPlayerPanel.cs +++ b/Switch_Toolbox_Library/Forms/Editors/Audio/AudioPlayerPanel.cs @@ -66,10 +66,13 @@ namespace Toolbox.Library.Forms } - public void LoadFile(IWaveSource source, IFileFormat fileFormat, bool ClearPlaylist = false, object AudioStruct = null) + public void LoadFile(IWaveSource source, IFileFormat fileFormat, bool ClearPlaylist = true, object AudioStruct = null) { if (ClearPlaylist) + { audioListView.Items.Clear(); + AudioFileFormats.Clear(); + } AudioFile file = new AudioFile(); file.Title = fileFormat.FileName; @@ -83,8 +86,6 @@ namespace Toolbox.Library.Forms } AudioFileFormats.Add(fileFormat); - - audioListView.AddObject(file); AudioChannel audioChannel = new AudioChannel(); @@ -105,10 +106,13 @@ namespace Toolbox.Library.Forms } - public void LoadFile(AudioData audioData, IFileFormat fileFormat, bool ClearPlaylist = false) + public void LoadFile(AudioData audioData, IFileFormat fileFormat, bool ClearPlaylist = true) { if (ClearPlaylist) + { audioListView.Items.Clear(); + AudioFileFormats.Clear(); + } AudioFileFormats.Add(fileFormat);