From 38328188e95f7c41f17220a03ba444abb39f4d98 Mon Sep 17 00:00:00 2001 From: Koseng <26673978+Koseng@users.noreply.github.com> Date: Mon, 26 Feb 2024 18:08:32 +0100 Subject: [PATCH] Fix display panel sync input config (#1718) --- UI/Panels/OutputWizard/DisplayPanel.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/UI/Panels/OutputWizard/DisplayPanel.cs b/UI/Panels/OutputWizard/DisplayPanel.cs index dac1bfd54..267ce493c 100644 --- a/UI/Panels/OutputWizard/DisplayPanel.cs +++ b/UI/Panels/OutputWizard/DisplayPanel.cs @@ -167,14 +167,8 @@ internal void syncFromConfig(OutputConfigItem cfg) } else { - var analogInputConfig = new AnalogInputConfig(); - analogInputConfig.onChange = config.AnalogInputConfig?.onChange; - analogPanel1.syncFromConfig(analogInputConfig); - - var buttonInputConfig = new ButtonInputConfig(); - buttonInputConfig.onPress = config.ButtonInputConfig?.onPress; - buttonInputConfig.onRelease = config.ButtonInputConfig?.onRelease; - buttonPanel1.syncFromConfig(buttonInputConfig); + analogPanel1.syncFromConfig(config.AnalogInputConfig); + buttonPanel1.syncFromConfig(config.ButtonInputConfig); InputTypeButtonRadioButton.Checked = config.AnalogInputConfig?.onChange == null; InputTypeAnalogRadioButton.Checked = config.AnalogInputConfig?.onChange != null;