Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate changed stimsets better #1915

Merged
merged 12 commits into from
Oct 17, 2023

Conversation

t-b
Copy link
Collaborator

@t-b t-b commented Oct 16, 2023

Backport of #1908

t-b added 12 commits October 16, 2023 21:20
Since the introduction of combine epochs for the wavebuilder in 9b80987
(WaveBuilder: Add new epoch type Combine, 2015-11-12) we need to maintain
a wave with the shorthand<->full name mapping. This mapping is updated in
WB_UpdateEpochCombineList.

Now that function was not called when loading stimsets from NWB and not
after starting the wavebuilder panel which resulted in errors trying to
recreate combine epochs.

This is now fixed. In order to make the fix less hacky we also introduced
WB_UpdateChangedStimsets which also calls
DAP_UpdateDaEphysStimulusSetPopups which needs to be called in the same
cases.
Since forever we just gathered the stimset lists for the currently created
combine epoch. But we can do it actually more efficient if we store these
lists permanently.

And by filling epochCombineList on creation initially we also avoid
recreation issues where neither a wavebuilder panel was created nor a
device locked.
When we don't have any stimsets the for-loop would never finish.
Forgotten in effe355 (MIES_WaveBuilderPanel.ipf: Add
GetEpochParameterNames, 2021-05-28).
We must not just replace stimset names as two stimsets might have the same
ending substring.

By just replacing only full words we avoid the issue without having to
change what we store in WPT.

Bug introduced in the initial version in 9b80987 (WaveBuilder: Add new
epoch type Combine, 2015-11-12).
@t-b t-b requested a review from timjarsky as a code owner October 16, 2023 19:23
@t-b t-b enabled auto-merge October 16, 2023 19:23
@t-b t-b merged commit 89aadde into release/2.7 Oct 17, 2023
16 checks passed
@t-b t-b deleted the bugfix/1915-combine-stimsets-backport branch October 17, 2023 19:41
@timjarsky timjarsky assigned t-b and unassigned timjarsky Oct 17, 2023
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