aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/AudioPlayer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.WinForms/Applications/AudioPlayer.cs')
-rw-r--r--ShiftOS.WinForms/Applications/AudioPlayer.cs15
1 files changed, 6 insertions, 9 deletions
diff --git a/ShiftOS.WinForms/Applications/AudioPlayer.cs b/ShiftOS.WinForms/Applications/AudioPlayer.cs
index 28e1c56..9940ddd 100644
--- a/ShiftOS.WinForms/Applications/AudioPlayer.cs
+++ b/ShiftOS.WinForms/Applications/AudioPlayer.cs
@@ -162,20 +162,17 @@ namespace ShiftOS.WinForms.Applications
}
if (o.PlaybackState == NAudio.Wave.PlaybackState.Stopped)
{
- if (lbtracks.SelectedIndex < lbtracks.Items.Count - 1)
+ this.Invoke(new Action(() =>
{
- this.Invoke(new Action(() =>
+ if (lbtracks.SelectedIndex < lbtracks.Items.Count - 1)
{
lbtracks.SelectedIndex++;
- }));
- }
- else if(loopToolStripMenuItem.Checked == true)
- {
- this.Invoke(new Action(() =>
+ }
+ else if (loopToolStripMenuItem.Checked == true)
{
lbtracks.SelectedIndex = 0;
- }));
- }
+ }
+ }));
}
}).Start();
}