Index: trunk/src/layer_grp.h =================================================================== --- trunk/src/layer_grp.h (revision 8572) +++ trunk/src/layer_grp.h (revision 8573) @@ -45,6 +45,7 @@ unsigned valid:1; /* 1 if it's a new-style, valid layer group; 0 after loading old files with no layer stackup info */ unsigned vis:1; /* 1 if layer group is visible on the GUI */ + unsigned open:1; /* 1 if the group is open (expanded) on the GUI */ /* internal: temporary states */ int intern_id; /* for the old layer import mechanism */ Index: trunk/src_plugins/lib_gtk_common/wt_layersel.c =================================================================== --- trunk/src_plugins/lib_gtk_common/wt_layersel.c (revision 8572) +++ trunk/src_plugins/lib_gtk_common/wt_layersel.c (revision 8573) @@ -120,7 +120,7 @@ static void group_vis_sync(pcb_gtk_ls_grp_t *lsg) { - if (lsg->open) { + if (lsg->grp->open) { int n; pcb_gtk_widget_hide_all(lsg->grp_closed); gtk_widget_set_no_show_all(lsg->grp_open, 0); @@ -137,7 +137,7 @@ /* a closed group has visibility boxes displayed, pick one to show */ if (lsg->vis_on != NULL) { - if (lsg->on) { + if (lsg->grp->vis) { gtk_widget_show(lsg->vis_on); gtk_widget_hide(lsg->vis_off); } @@ -161,7 +161,7 @@ { switch(event->button.button) { case 1: - lsg->on = !lsg->on; + lsg->grp->vis = !lsg->grp->vis; group_vis_sync(lsg); break; case 3: @@ -212,7 +212,7 @@ { switch(event->button.button) { case 1: - lsg->open = openval; + lsg->grp->open = openval; group_vis_sync(lsg); break; case 3: @@ -405,6 +405,7 @@ GtkWidget *scrolled; ls->grp_box = gtkc_vbox_new(FALSE, 0); + ls->grp_virt.open = 1; layersel_populate(ls); /* get the whole box vertically scrolled, if needed */ Index: trunk/src_plugins/lib_gtk_common/wt_layersel.h =================================================================== --- trunk/src_plugins/lib_gtk_common/wt_layersel.h (revision 8572) +++ trunk/src_plugins/lib_gtk_common/wt_layersel.h (revision 8573) @@ -29,10 +29,6 @@ /* for callbacks */ pcb_gtk_layersel_t *ls; /* points to parent */ - - /* TODO: temporary hack: will come from the core */ - unsigned on:1; /* central visibility (toggles all layers) */ - unsigned open:1; /* whether group is expanded, layers are visible */ };