Skip to content

Conversation

@ethanbb
Copy link
Contributor

@ethanbb ethanbb commented Sep 21, 2018

This fixes a bug where the last high cut and low cut values for the bandpass filter are not restored properly when loading a settings file (i.e. the text values of the labels; the actual passbands for each channel are already loaded correctly). This is a fairly minor issue, but it gets a little confusing if you've only selected some channels and changed their high and low cuts, and then when you load the settings back in you see the default values rather than the ones you put in.

The issue is that channelChanged updates the high and low cut text to correspond to the clicked channel, which is desired behavior except when it is called in the process of loading settings. The param selection states get restored after the editor settings, so channelChanged gets called for any channels that have been deselected after the high and low cut text have already been restored in FilterEditor::loadCustomParameters. To get around this, I set lastLowCutString and lastHighCutString when restoring the text, and then reset the labels to these values in loadCustomChannelParametersFromXml for each channel - counteracting channelChanged which gets called first.

@aacuevas aacuevas merged commit 5f3186d into open-ephys:testing Sep 23, 2018
@ethanbb ethanbb deleted the filternode-restore-labels branch September 23, 2018 18:36
@ethanbb ethanbb restored the filternode-restore-labels branch September 24, 2018 13:49
@ethanbb ethanbb deleted the filternode-restore-labels branch September 24, 2018 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants