r5918 - trunk/eda/fped

werner at docs.openmoko.org werner at docs.openmoko.org
Mon Apr 19 14:23:05 CEST 2010


Author: werner
Date: 2010-04-19 14:23:04 +0200 (Mon, 19 Apr 2010)
New Revision: 5918

Modified:
   trunk/eda/fped/gui_frame.c
Log:
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)



Modified: trunk/eda/fped/gui_frame.c
===================================================================
--- trunk/eda/fped/gui_frame.c	2010-04-18 22:01:19 UTC (rev 5917)
+++ trunk/eda/fped/gui_frame.c	2010-04-19 12:23:04 UTC (rev 5918)
@@ -679,11 +679,11 @@
 	 * 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 @@
     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)");




More information about the commitlog mailing list