From e302162a707f292bdc7cf1f0474589bee9996ed7 Mon Sep 17 00:00:00 2001 From: werner Date: Mon, 19 Apr 2010 12:23:04 +0000 Subject: [PATCH] When unselecting a value selected for editing in a table with a single row, the unselected value was set to the background color for an inactive row. Now it's set to the color of an active row. - gui_frame.c (unselect_value): to detect a table, consider not only the number of rows but also the number of columns - gui_frame.c (unselect_value, edit_value_list): use COLOR_EXPR_* for expressions, not COLOR_VAR_* (this has no visual effect for now, since the colors in questions have the same value) git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5918 99fdad57-331a-0410-800a-d7fa5415bdb3 --- gui_frame.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui_frame.c b/gui_frame.c index 7c76c89..e02a0ce 100644 --- a/gui_frame.c +++ b/gui_frame.c @@ -679,11 +679,11 @@ static void unselect_value(void *data) * AND it's an assignment (not a table). * * We need the last condition because the expressions of assignments - * are drawn with COLOR_VAR_PASSIVE. (See build_assignment.) + * are drawn with COLOR_EXPR_PASSIVE. (See build_assignment.) */ label_in_box_bg(value->widget, value->row && value->row->table->active_row == value->row && - value->row->table->rows->next ? + (value->row->table->rows->next || value->row->table->vars->next) ? COLOR_CHOICE_SELECTED : COLOR_EXPR_PASSIVE); } @@ -703,7 +703,7 @@ static void edit_value_list(struct value *value, const struct frame *frame, void *user) { inst_select_outside(value, unselect_value); - label_in_box_bg(value->widget, COLOR_VAR_EDITING); + label_in_box_bg(value->widget, COLOR_EXPR_EDITING); show_value(value->expr, frame); edit_nothing(); edit_expr_list(value->expr, set_values, user, "Value(s)");