From c24d8ddd65e9549b26e813681cac60365c1c5175 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 7 Aug 2011 12:54:52 +0000 Subject: WinGui: Refactored the Automatic Audio Selection so that it is more intuitive. Now, it will use your preferred language for the preset tracks, then add either all additional tracks, or all additional tracks for your selected additional languages. This should avoid any confusion as to why the previous setup as overriding presets. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4157 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/Controls/AudioPanel.cs | 118 ++++++++++++++++++++++++++---------------- 1 file changed, 72 insertions(+), 46 deletions(-) (limited to 'win/CS/Controls/AudioPanel.cs') diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index 3e912579b..f97af0605 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -184,10 +184,13 @@ namespace Handbrake.Controls /// A preset public void SetTrackListAfterTitleChange(Title selectedTitle, Preset preset) { + // Reset + this.AudioTracks.Clear(); + this.ScannedTracks.Clear(); + if (selectedTitle.AudioTracks.Count == 0) { - this.AudioTracks.Clear(); - this.ScannedTracks.Clear(); + this.ScannedTracks.Add(AudioHelper.NoneFound); this.drp_audioTrack.Refresh(); drp_audioTrack.SelectedIndex = 0; @@ -195,7 +198,7 @@ namespace Handbrake.Controls } // Setup the Audio track source dropdown with the new audio tracks. - this.ScannedTracks.Clear(); + // this.ScannedTracks.Clear(); this.drp_audioTrack.SelectedItem = null; this.ScannedTracks = new BindingList