Skip to content

Commit d989371

Browse files
committed
Ensure that settings are saved correctly after loading
1 parent 1763688 commit d989371

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

OpenEphys.Onix1.Design/NeuropixelsV1eDialog.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public NeuropixelsV1eDialog(ConfigureNeuropixelsV1e configureNode)
5858
this.AddMenuItemsFromDialogToFileOption(ChannelConfiguration);
5959

6060
ChannelConfiguration.OnZoom += UpdateTrackBarLocation;
61-
ChannelConfiguration.OnFileLoad += UpdateChannelPresetIndex;
61+
ChannelConfiguration.OnFileLoad += OnFileLoadEvent;
6262

6363
comboBoxApGain.DataSource = Enum.GetValues(typeof(NeuropixelsV1Gain));
6464
comboBoxApGain.SelectedItem = ConfigureNode.ProbeConfiguration.SpikeAmplifierGain;
@@ -230,8 +230,10 @@ private void CheckForExistingChannelPreset()
230230
}
231231
}
232232

233-
private void UpdateChannelPresetIndex(object sender, EventArgs e)
233+
private void OnFileLoadEvent(object sender, EventArgs e)
234234
{
235+
// NB: Ensure that the newly loaded ProbeConfiguration in the ChannelConfigurationDialog is reflected here.
236+
ConfigureNode.ProbeConfiguration = ChannelConfiguration.ProbeConfiguration;
235237
CheckForExistingChannelPreset();
236238
}
237239

0 commit comments

Comments
 (0)