From 845eca98b3c312d9916d5faa80837b547632bcae Mon Sep 17 00:00:00 2001 From: George Dang <53052793+gtdang@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:25:09 -0400 Subject: [PATCH] fix: set selected index for figure controls after new figure is generated When creating a blank figure, the GUI was not automatically opening/selecting the new figure tab. This was because the selected index was only being set for the figure tabs but not the figure control tabs. This made them not synchronous, and when the two tab groups are later linked, it reverted to the un-updated index. --- hnn_core/gui/_viz_manager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hnn_core/gui/_viz_manager.py b/hnn_core/gui/_viz_manager.py index afab5e15d..71144ad6b 100644 --- a/hnn_core/gui/_viz_manager.py +++ b/hnn_core/gui/_viz_manager.py @@ -781,6 +781,7 @@ def _add_figure(b, widgets, data, template_type, scale=0.95, dpi=96): data['figs'][fig_idx] = fig widgets['figs_tabs'].selected_index = n_tabs + widgets['axes_config_tabs'].selected_index = n_tabs data['fig_idx']['idx'] += 1