From 11edf5691181567bdf8396d4e7a0aae85d64607a 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 27a78e081..8be8f62db 100644 --- a/hnn_core/gui/_viz_manager.py +++ b/hnn_core/gui/_viz_manager.py @@ -777,6 +777,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