[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: x_attribedit.nw
User: cnieves
Date: 05/12/17 10:05:47
Modified: . x_attribedit.nw
Log:
Change values when replacing properties, instead of deleting it and adding a new property.
Revision Changes Path
1.25 +9 -4 eda/geda/devel/gschem/noweb/x_attribedit.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_attribedit.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/x_attribedit.nw,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- x_attribedit.nw 12 Feb 2005 01:20:39 -0000 1.24
+++ x_attribedit.nw 17 Dec 2005 15:05:47 -0000 1.25
@@ -234,6 +234,8 @@
}
while (s_current != NULL) {
+ gboolean replaced;
+
object = s_current->selected_object;
if (object && !object->attached_to && object->type != OBJ_TEXT ) {
addmask = 4;
@@ -243,6 +245,7 @@
if (object->type == OBJ_NET) {
addmask = 1;
}
+ replaced = FALSE;
if (addmask & addto) {
a_current = object->attribs;
if (replace) {
@@ -254,17 +257,19 @@
if (!strncmp
(a_sav->object->text->string, newtext,
strchr(newtext, '=') - newtext)) {
- o_selection_remove(w_current->page_current->
- selection2_head, a_sav->object);
- o_delete_text(w_current, a_sav->object);
+ o_text_change(w_current, a_sav->object,
+ newtext, vis, show);
+ replaced = TRUE;
w_current->page_current->CHANGED = 1;
}
}
}
}
+ if (!replaced) {
new = o_attrib_add_attrib(w_current, newtext, vis, show, object);
}
}
+ }
s_current = s_current->next;
}
o_undo_savestate(w_current, UNDO_ALL);