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

Re: gEDA-user: gpcb-menu.res



On Thu, 2011-09-01 at 01:46 +0100, Peter Clifton wrote:

> Yes - I did break it (at least partially).. I'll fix the bit I broke.

Not a complete fix, but:

commit acbf10c2bf1814c5ffbe13dbcfd03fc9ffcaca89
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Attempt to fix logic to flip component / solder group visibility on flip
    
    Should get back to better behaviour. I probably broke this somewhat with
    commit f903b4be6b85efc110852f7be40edf8245f0a513, which attempted to
    re-state the previous logic in a clearer fashon.
    
    The logic now should:
    
    If flipping sides, and only ONE of the solder / component layers (groups)
    is visible, and that layer (group) is _active_, then swap the visibilities
    of the component / solder layers (groups), and make the newly visible
    layer (group) active.
    
    There are still bugs in this code relating to the assumption that the
    first entry in the layer group is the one which is being toggled. This
    breaks if the first entry in the group is that corresponding to the silk
    for that side of the board.

diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 4d9fdbe..7a6b8a8 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -1408,12 +1408,12 @@ SwapSides (int argc, char **argv, Coord x, Coord y)
   if ((active_group == comp_group   && comp_on   && !solder_on) ||
       (active_group == solder_group && solder_on && !comp_on))
     {
-      bool new_comp_vis = Settings.ShowSolderSide && active_group == comp_group;
+      bool new_solder_vis = Settings.ShowSolderSide;
 
       ChangeGroupVisibility (PCB->LayerGroups.Entries[comp_group][0],
-                             new_comp_vis, new_comp_vis);
+                             !new_solder_vis, !new_solder_vis);
       ChangeGroupVisibility (PCB->LayerGroups.Entries[solder_group][0],
-                             !new_comp_vis, !new_comp_vis);
+                             new_solder_vis, new_solder_vis);
     }
 
   return 0;

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)

Attachment: signature.asc
Description: This is a digitally signed message part


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