Skip to content

Commit

Permalink
MAINT: Adding simulation names to both dropdown lists in the plot-viz…
Browse files Browse the repository at this point in the history
… tab
  • Loading branch information
kmilo9999 authored and gtdang committed Jul 25, 2024
1 parent 0c1cfbf commit a81d8fc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions hnn_core/gui/_viz_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,18 @@ def data(self):

def reset_fig_config_tabs(self, template_name=None):
"""Reset the figure config tabs with most recent simulation data."""
simulation_names = tuple(self.data['simulations'].keys())
for tab in self.axes_config_tabs.children:
controls = tab.children[1]
for ax_control in controls.children:
# Update the options for the simulation data selection dropdown
simulation_data_selection = ax_control.children[1]
simulation_data_selection.options = simulation_names

# Update the options for the simulation to compare dropdown
simulation_to_compare = ax_control.children[4]
simulation_to_compare.options = simulation_names

# recover the default layout
if template_name is None:
template_name = list(fig_templates.keys())[0]
Expand Down

0 comments on commit a81d8fc

Please sign in to comment.