diff --git a/src/sview/grid.c b/src/sview/grid.c index ef344df5ea0b4837a5e509f86f776ecd299d7129..37722f8ede2bc64be693db3b80c872c3b8800cde 100644 --- a/src/sview/grid.c +++ b/src/sview/grid.c @@ -984,7 +984,7 @@ extern int update_grid_table(GtkTable *table, List button_list, List node_list) } if(!node_list) { - g_print("setup_grid_table: no node_list given\n"); + g_print("update_grid_table: no node_list given\n"); return SLURM_ERROR; } diff --git a/src/sview/popups.c b/src/sview/popups.c index 40a2347a05c7e6cf2ec67e605d625cbd11b85120..5dfea7863500145ad8df48d1f05f5fa4853f1adf 100644 --- a/src/sview/popups.c +++ b/src/sview/popups.c @@ -821,13 +821,27 @@ extern void change_grid_popup(GtkAction *action, gpointer user_data) && (vert == working_sview_config.grid_vert)) { temp = g_strdup_printf("Grid: Nothing changed."); } else { + bool refresh = 0; temp = g_strdup_printf( "Grid set to %d nodes breaks " "at %d H and %d V.", working_sview_config.grid_x_width, working_sview_config.grid_hori, working_sview_config.grid_vert); + /* If the old width was wider than the + * current we need to remake the list so the + * table gets set up correctly, so destroy it + * here and it will be remade in get_system_stats(). */ + if((width > working_sview_config.grid_x_width) + && grid_button_list) { + list_destroy(grid_button_list); + grid_button_list = NULL; + refresh = 1; + } get_system_stats(main_grid_table); + if(refresh) + refresh_main(NULL, NULL); + } gtk_statusbar_pop(GTK_STATUSBAR(main_statusbar), STATUS_REFRESH);