From 5a018b6c6863830910f16aaabd9afbe4ee0c3890 Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 26 May 2011 18:29:04 +0000 Subject: WinGui: Fix to the Audio Panel. It now creates a copy of the sources Audio Tracks collection rather than using a reference. The reference was getting cleared out if the user re-selected a title which was causing a crash. Also added some extra sanity checking code in to prevent possible issues. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4005 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/Controls/AudioPanel.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'win/CS/Controls') diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index 8b385d992..66b25c5b0 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -190,7 +190,7 @@ namespace Handbrake.Controls { if (selectedTitle.AudioTracks.Count == 0) { - audioList.Rows.Clear(); + this.AudioTracks.Clear(); this.ScannedTracks.Clear(); this.ScannedTracks.Add(AudioHelper.NoneFound); this.drp_audioTrack.Refresh(); @@ -201,7 +201,7 @@ namespace Handbrake.Controls // Setup the Audio track source dropdown with the new audio tracks. this.ScannedTracks.Clear(); this.drp_audioTrack.SelectedItem = null; - this.ScannedTracks = new BindingList