Skip to content
Snippets Groups Projects
Commit 6c4e879b authored by Danny Auble's avatar Danny Auble
Browse files

fix for when making the grid smaller than previous

parent 4f775b41
No related branches found
No related tags found
No related merge requests found
...@@ -984,7 +984,7 @@ extern int update_grid_table(GtkTable *table, List button_list, List node_list) ...@@ -984,7 +984,7 @@ extern int update_grid_table(GtkTable *table, List button_list, List node_list)
} }
if(!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; return SLURM_ERROR;
} }
......
...@@ -821,13 +821,27 @@ extern void change_grid_popup(GtkAction *action, gpointer user_data) ...@@ -821,13 +821,27 @@ extern void change_grid_popup(GtkAction *action, gpointer user_data)
&& (vert == working_sview_config.grid_vert)) { && (vert == working_sview_config.grid_vert)) {
temp = g_strdup_printf("Grid: Nothing changed."); temp = g_strdup_printf("Grid: Nothing changed.");
} else { } else {
bool refresh = 0;
temp = g_strdup_printf( temp = g_strdup_printf(
"Grid set to %d nodes breaks " "Grid set to %d nodes breaks "
"at %d H and %d V.", "at %d H and %d V.",
working_sview_config.grid_x_width, working_sview_config.grid_x_width,
working_sview_config.grid_hori, working_sview_config.grid_hori,
working_sview_config.grid_vert); 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); get_system_stats(main_grid_table);
if(refresh)
refresh_main(NULL, NULL);
} }
gtk_statusbar_pop(GTK_STATUSBAR(main_statusbar), gtk_statusbar_pop(GTK_STATUSBAR(main_statusbar),
STATUS_REFRESH); STATUS_REFRESH);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment