[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (8857757d007305f95b69445ede344a263c90c345)
The branch, master has been updated
via 8857757d007305f95b69445ede344a263c90c345 (commit)
via 84b14662b41e5a1309379b063a6628e54ee3cf63 (commit)
from 67de03c8e140500a517220e56dc3ddcff165088d (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/ghid-layer-selector.c | 4 +++-
src/hid/gtk/gui-top-window.c | 23 +++++++++++++++++------
2 files changed, 20 insertions(+), 7 deletions(-)
=================
Commit Messages
=================
commit 8857757d007305f95b69445ede344a263c90c345
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>
gtk: fix behavior when hiding the last visible layer
When you try to toggle the last layer invisible, pcb should refuse
to let you do so, since something has to be selected, and we don't
allow selection of invisible layers.
What actually happens is that pcb locks up. This patch fixes that.
:100644 100644 84db76e... 6ddbd3f... M src/hid/gtk/ghid-layer-selector.c
:100644 100644 ca7df6a... f713446... M src/hid/gtk/gui-top-window.c
commit 84b14662b41e5a1309379b063a6628e54ee3cf63
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>
gtk: Force silk and rat layers visible when they are selected.
:100644 100644 91572fb... ca7df6a... M src/hid/gtk/gui-top-window.c
=========
Changes
=========
commit 8857757d007305f95b69445ede344a263c90c345
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>
gtk: fix behavior when hiding the last visible layer
When you try to toggle the last layer invisible, pcb should refuse
to let you do so, since something has to be selected, and we don't
allow selection of invisible layers.
What actually happens is that pcb locks up. This patch fixes that.
diff --git a/src/hid/gtk/ghid-layer-selector.c b/src/hid/gtk/ghid-layer-selector.c
index 84db76e..6ddbd3f 100644
--- a/src/hid/gtk/ghid-layer-selector.c
+++ b/src/hid/gtk/ghid-layer-selector.c
@@ -808,8 +808,10 @@ ghid_layer_selector_select_next_visible (GHidLayerSelector *ls)
}
}
while (gtk_tree_model_iter_next (GTK_TREE_MODEL (ls->list_store), &iter));
- /* If we get here, nothing is selectable, so fail. */
+ /* Failing this, just emit a selected signal on the original layer. */
+ selection_changed_cb (ls->selection, ls);
}
+ /* If we get here, nothing is selectable, so fail. */
return FALSE;
}
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index ca7df6a..f713446 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -420,12 +420,13 @@ layer_selector_toggle_callback (GHidLayerSelector *ls, int layer, gpointer d)
break;
}
- /* Jump through hoops in case we just disabled the active layer
- * (or its group). In this case, select a different one if we
- * can. If we can't, turn the original layer back on.
+ /* Select the next visible layer. (If there is none, this will
+ * select the currently-selected layer, triggering the selection
+ * callback, which will turn the visibility on.) This way we
+ * will never have an invisible layer selected.
*/
- if (!ghid_layer_selector_select_next_visible (ls))
- ChangeGroupVisibility (layer, true, false);
+ if (!active)
+ ghid_layer_selector_select_next_visible (ls);
ignore_layer_update = false;
commit 84b14662b41e5a1309379b063a6628e54ee3cf63
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>
gtk: Force silk and rat layers visible when they are selected.
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 91572fb..ca7df6a 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -353,7 +353,17 @@ layer_selector_select_callback (GHidLayerSelector *ls, int layer, gpointer d)
/* Select Layer */
PCB->SilkActive = (layer == LAYER_BUTTON_SILK);
PCB->RatDraw = (layer == LAYER_BUTTON_RATS);
- if (layer < max_copper_layer)
+ if (layer == LAYER_BUTTON_SILK)
+ {
+ PCB->ElementOn = true;
+ hid_action ("LayersChanged");
+ }
+ else if (layer == LAYER_BUTTON_RATS)
+ {
+ PCB->RatOn = true;
+ hid_action ("LayersChanged");
+ }
+ else if (layer < max_copper_layer)
ChangeGroupVisibility (layer, TRUE, true);
ignore_layer_update = false;
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs