[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: pcb.git: branch: master updated (d3449dfd68f6e751ffd760c0b7dcd96689b314d5)



The branch, master has been updated
       via  d3449dfd68f6e751ffd760c0b7dcd96689b314d5 (commit)
      from  c200dd11f9c608a40db6e9894eafc34510aff220 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 src/hid/gtk/gui-top-window.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)


=================
 Commit Messages
=================

commit d3449dfd68f6e751ffd760c0b7dcd96689b314d5
Author: Jared Casper <jaredcasper@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Fix a bug in gtk hid which caused layer buttons to get confused (sourceforge bug 1988951)
    
    In ghid_layer_enable_buttons_update, the layer_buttons array was being
    indexed using a counter which stoped at the current max_layer, which
    was wrong.  Changed this to use the constants LAYER_BUTTON_*.
    
    Also made the handling of the silk and rats buttons match the
    (slightly more correct) handling of the other buttons in
    layer_enable_button_cb.

:100644 100644 ca17446... b950a25... M	src/hid/gtk/gui-top-window.c

=========
 Changes
=========

commit d3449dfd68f6e751ffd760c0b7dcd96689b314d5
Author: Jared Casper <jaredcasper@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Fix a bug in gtk hid which caused layer buttons to get confused (sourceforge bug 1988951)
    
    In ghid_layer_enable_buttons_update, the layer_buttons array was being
    indexed using a counter which stoped at the current max_layer, which
    was wrong.  Changed this to use the constants LAYER_BUTTON_*.
    
    Also made the handling of the silk and rats buttons match the
    (slightly more correct) handling of the other buttons in
    layer_enable_button_cb.

diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index ca17446..b950a25 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -1380,14 +1380,14 @@ layer_enable_button_cb (GtkWidget * widget, gpointer data)
   switch (layer)
     {
     case LAYER_BUTTON_SILK:
-      PCB->ElementOn = !PCB->ElementOn;
+      PCB->ElementOn = active;
       PCB->Data->SILKLAYER.On = PCB->ElementOn;
       PCB->Data->BACKSILKLAYER.On = PCB->ElementOn;
       redraw = 1;
       break;
 
     case LAYER_BUTTON_RATS:
-      PCB->RatOn = !PCB->RatOn;
+      PCB->RatOn = active;
       redraw = 1;
       break;
 
@@ -1649,23 +1649,23 @@ ghid_layer_enable_buttons_update (void)
   /* Buttons for elements (silk), rats, pins, vias, and far side don't
      |  change labels.
    */
-  lb = &layer_buttons[i++];	/* LAYER_BUTTON_SILK */
+  lb = &layer_buttons[LAYER_BUTTON_SILK];
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lb->layer_enable_button),
 				PCB->ElementOn);
 
-  lb = &layer_buttons[i++];	/* LAYER_BUTTON_RATS */
+  lb = &layer_buttons[LAYER_BUTTON_RATS];
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lb->layer_enable_button),
 				PCB->RatOn);
 
-  lb = &layer_buttons[i++];	/* pins/pads    */
+  lb = &layer_buttons[LAYER_BUTTON_PINS];
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lb->layer_enable_button),
 				PCB->PinOn);
 
-  lb = &layer_buttons[i++];	/* vias         */
+  lb = &layer_buttons[LAYER_BUTTON_VIAS];
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lb->layer_enable_button),
 				PCB->ViaOn);
 
-  lb = &layer_buttons[i++];	/* far side     */
+  lb = &layer_buttons[LAYER_BUTTON_FARSIDE];
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lb->layer_enable_button),
 				PCB->InvisibleObjectsOn);
   layer_enable_button_cb_hold_off = FALSE;




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs