[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.1-20081221-127-ge3cbd2a)
The branch, master has been updated
via e3cbd2a5505f6b284cbe12fdcf72acde6f6ef291 (commit)
from 72fd3257b7f7949714e16b6bb970c6b7bd658305 (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
=========
gschem/src/x_dialog.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit e3cbd2a5505f6b284cbe12fdcf72acde6f6ef291
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sat Jan 3 16:10:24 2009 +0000
gschem: Add undo point after converting pins to / from being bus pins
Also fix the edit dialog not to show if the selection doesn't contain
any pins.
:100644 100644 f782484... f0fdd0c... M gschem/src/x_dialog.c
=========
Changes
=========
commit e3cbd2a5505f6b284cbe12fdcf72acde6f6ef291
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sat Jan 3 16:10:24 2009 +0000
gschem: Add undo point after converting pins to / from being bus pins
Also fix the edit dialog not to show if the selection doesn't contain
any pins.
diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index f782484..f0fdd0c 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -4126,8 +4126,18 @@ void x_dialog_edit_pin_type (GSCHEM_TOPLEVEL *w_current, const GList *obj_list)
GtkWidget *radio2;
const GList *iter;
int new_type;
+ int found_pins = FALSE;
+ int changed_anything = FALSE;
- if (obj_list == NULL)
+ for (iter = obj_list; iter != NULL; iter = g_list_next (iter)) {
+ OBJECT *object = iter->data;
+ if (object->type == OBJ_PIN) {
+ found_pins = TRUE;
+ break;
+ }
+ }
+
+ if (!found_pins)
return;
dialog = gschem_dialog_new_with_buttons(_("Pin type"),
@@ -4169,7 +4179,9 @@ void x_dialog_edit_pin_type (GSCHEM_TOPLEVEL *w_current, const GList *obj_list)
for (iter = obj_list; iter != NULL; iter = g_list_next (iter)) {
OBJECT *object = iter->data;
- if (object->type == OBJ_PIN) {
+ if (object->type == OBJ_PIN &&
+ object->pin_type != new_type) {
+ changed_anything = TRUE;
o_invalidate (w_current, object);
s_conn_remove_object (w_current->toplevel, object);
o_pin_set_type (object, new_type);
@@ -4177,6 +4189,8 @@ void x_dialog_edit_pin_type (GSCHEM_TOPLEVEL *w_current, const GList *obj_list)
o_invalidate (w_current, object);
}
}
+ if (changed_anything)
+ o_undo_savestate (w_current, UNDO_ALL);
break;
case GTK_RESPONSE_CANCEL:
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs