diff --git a/CUETools.Processor/CUEToolsUDC.cs b/CUETools.Processor/CUEToolsUDC.cs index 444f7e1..42a8d27 100644 --- a/CUETools.Processor/CUEToolsUDC.cs +++ b/CUETools.Processor/CUEToolsUDC.cs @@ -132,11 +132,17 @@ namespace CUETools.Processor get { return lossless; } set { lossless = value; if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Lossless")); } } - + public string Extension { get { return extension; } - set { if (extension == value) return; extension = value; if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Extension")); } + set + { + if (extension == value) return; + if (type != null && type != typeof(UserDefinedWriter)) throw new InvalidOperationException(); + extension = value; + if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Extension")); + } } public string DotExtension diff --git a/CUETools/frmCUETools.cs b/CUETools/frmCUETools.cs index aa9d1bd..6381a62 100644 --- a/CUETools/frmCUETools.cs +++ b/CUETools/frmCUETools.cs @@ -2718,7 +2718,6 @@ namespace JDP settingsForm.Config = _profile._config; settingsForm.ShowDialog(this); } - SaveSettings(); SelectedOutputAudioType = SelectedOutputAudioType; } } diff --git a/CUETools/frmSettings.Designer.cs b/CUETools/frmSettings.Designer.cs index 09f5a80..87c4e3e 100644 --- a/CUETools/frmSettings.Designer.cs +++ b/CUETools/frmSettings.Designer.cs @@ -1174,7 +1174,6 @@ namespace JDP this.comboBoxEncoderExtension.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxEncoderExtension.FormattingEnabled = true; this.comboBoxEncoderExtension.Name = "comboBoxEncoderExtension"; - this.comboBoxEncoderExtension.SelectedIndexChanged += new System.EventHandler(this.comboBoxEncoderExtension_SelectedIndexChanged); // // listBoxEncoders // diff --git a/CUETools/frmSettings.cs b/CUETools/frmSettings.cs index 951c97e..f532e55 100644 --- a/CUETools/frmSettings.cs +++ b/CUETools/frmSettings.cs @@ -459,13 +459,6 @@ namespace JDP } } - private void comboBoxEncoderExtension_SelectedIndexChanged(object sender, EventArgs e) - { - // Setting DataSourceUpdateMode to OnPropertyChanged doesn't seem - // to do the trick, so updating manually - comboBoxEncoderExtension.DataBindings["SelectedItem"].WriteValue(); - } - private void encodersBindingSource_CurrentItemChanged(object sender, EventArgs e) { CUEToolsUDC encoder = encodersBindingSource.Current as CUEToolsUDC;