From 655427dc20db592501425385f29a2175257812be Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Fri, 17 Nov 2023 12:10:28 -0600 Subject: [PATCH] Don't change language setting with scroll wheel --- GUI/Dialogs/SettingsDialog.Designer.cs | 1 + GUI/Dialogs/SettingsDialog.cs | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/GUI/Dialogs/SettingsDialog.Designer.cs b/GUI/Dialogs/SettingsDialog.Designer.cs index c262a49152..7d9573fd6b 100644 --- a/GUI/Dialogs/SettingsDialog.Designer.cs +++ b/GUI/Dialogs/SettingsDialog.Designer.cs @@ -563,6 +563,7 @@ private void InitializeComponent() this.LanguageSelectionComboBox.TabIndex = 0; this.LanguageSelectionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.LanguageSelectionComboBox.SelectionChangeCommitted += new System.EventHandler(this.LanguageSelectionComboBox_SelectionChanged); + this.LanguageSelectionComboBox.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.LanguageSelectionComboBox_MouseWheel); // // RefreshOnStartupCheckbox // diff --git a/GUI/Dialogs/SettingsDialog.cs b/GUI/Dialogs/SettingsDialog.cs index b8cc04dc53..cedf3f3f0e 100644 --- a/GUI/Dialogs/SettingsDialog.cs +++ b/GUI/Dialogs/SettingsDialog.cs @@ -604,6 +604,15 @@ private void HideVCheckbox_CheckedChanged(object sender, EventArgs e) Main.Instance.configuration.HideV = HideVCheckbox.Checked; } + private void LanguageSelectionComboBox_MouseWheel(object sender, MouseEventArgs e) + { + // Don't change values on scroll + if (e is HandledMouseEventArgs me) + { + me.Handled = true; + } + } + private void LanguageSelectionComboBox_SelectionChanged(object sender, EventArgs e) { config.Language = LanguageSelectionComboBox.SelectedItem.ToString();