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

gEDA-cvs: gaf.git: branch: master updated (1.6.1-20100214-87-g351bdfd)



The branch, master has been updated
       via  351bdfd3b45c8283c5dd9b9e903edf648fa5df00 (commit)
      from  54ef9936ca0f046ea37d4aa3b2d9b5ca524bbbc8 (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/o_slot.c        |    3 +--
 gschem/src/x_autonumber.c  |   10 ++++++----
 libgeda/src/o_text_basic.c |    2 ++
 libgeda/src/s_slot.c       |    1 -
 4 files changed, 9 insertions(+), 7 deletions(-)


=================
 Commit Messages
=================

commit 351bdfd3b45c8283c5dd9b9e903edf648fa5df00
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Move o_text_recreate() call inside o_text_set_string()
    
    All callers of o_text_set_string() call o_text_recreate() to update
    the text object. o_text_set_string() should call it directly.
    
    Despite being a hold over from the old "prim_objs" based text rendering
    system, this function still does useful work preparing the string to be
    displayed on screen.

:100644 100644 91d9dcc... 91774e3... M	gschem/src/o_slot.c
:100644 100644 ebe5f2b... b6768e8... M	gschem/src/x_autonumber.c
:100644 100644 50a1c53... b1f6498... M	libgeda/src/o_text_basic.c
:100644 100644 e47b76f... 7afabe5... M	libgeda/src/s_slot.c

=========
 Changes
=========

commit 351bdfd3b45c8283c5dd9b9e903edf648fa5df00
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Move o_text_recreate() call inside o_text_set_string()
    
    All callers of o_text_set_string() call o_text_recreate() to update
    the text object. o_text_set_string() should call it directly.
    
    Despite being a hold over from the old "prim_objs" based text rendering
    system, this function still does useful work preparing the string to be
    displayed on screen.

diff --git a/gschem/src/o_slot.c b/gschem/src/o_slot.c
index 91d9dcc..91774e3 100644
--- a/gschem/src/o_slot.c
+++ b/gschem/src/o_slot.c
@@ -113,11 +113,10 @@ void o_slot_end(GSCHEM_TOPLEVEL *w_current, OBJECT *object, const char *string)
   g_free (slot_value);
 
   if (o_slot != NULL && !o_attrib_is_inherited (o_slot)) {
-    o_text_set_string (toplevel, o_slot, string);
 
     o_invalidate (w_current, o_slot);
 
-    o_text_recreate (toplevel, o_slot);
+    o_text_set_string (toplevel, o_slot, string);
 
     /* this doesn't deal with the selection list
      * item */
diff --git a/gschem/src/x_autonumber.c b/gschem/src/x_autonumber.c
index ebe5f2b..b6768e8 100644
--- a/gschem/src/x_autonumber.c
+++ b/gschem/src/x_autonumber.c
@@ -572,6 +572,9 @@ void autonumber_remove_number(AUTONUMBER_TEXT * autotext, OBJECT *o_current)
   gchar *slot_str;
   gchar *str = NULL;
 
+  /* invalidate the old text */
+  o_invalidate (autotext->w_current, o_current);
+
   /* replace old text */
   str = g_strdup_printf("%s?", autotext->current_searchtext);
   o_text_set_string (autotext->w_current->toplevel, o_current, str);
@@ -579,8 +582,6 @@ void autonumber_remove_number(AUTONUMBER_TEXT * autotext, OBJECT *o_current)
 
   /* redraw the text */
   o_invalidate (autotext->w_current, o_current);
-  o_text_recreate(autotext->w_current->toplevel, o_current);
-  o_invalidate (autotext->w_current, o_current);
 
   /* remove the slot attribute if slotting is active */
   if (autotext->slotting) {
@@ -618,6 +619,9 @@ void autonumber_apply_new_text(AUTONUMBER_TEXT * autotext, OBJECT *o_current,
   o_slot_end (autotext->w_current, o_current->attached_to, str);
   g_free (str);
 
+  /* invalidate the old text */
+  o_invalidate (autotext->w_current, o_current);
+
   /* replace old text */
   str = g_strdup_printf("%s%d", autotext->current_searchtext, number);
   o_text_set_string (autotext->w_current->toplevel, o_current, str);
@@ -625,8 +629,6 @@ void autonumber_apply_new_text(AUTONUMBER_TEXT * autotext, OBJECT *o_current,
 
   /* redraw the text */
   o_invalidate (autotext->w_current, o_current);
-  o_text_recreate(autotext->w_current->toplevel, o_current);
-  o_invalidate (autotext->w_current, o_current);
   autotext->w_current->toplevel->page_current->CHANGED = 1;
 }
 
diff --git a/libgeda/src/o_text_basic.c b/libgeda/src/o_text_basic.c
index 50a1c53..b1f6498 100644
--- a/libgeda/src/o_text_basic.c
+++ b/libgeda/src/o_text_basic.c
@@ -986,6 +986,8 @@ void o_text_set_string (TOPLEVEL *toplevel, OBJECT *obj,
 
   g_free (obj->text->string);
   obj->text->string = g_strdup (new_string);
+
+  o_text_recreate (toplevel, obj);
 }
 
 
diff --git a/libgeda/src/s_slot.c b/libgeda/src/s_slot.c
index e47b76f..7afabe5 100644
--- a/libgeda/src/s_slot.c
+++ b/libgeda/src/s_slot.c
@@ -206,7 +206,6 @@ void s_slot_update_object (TOPLEVEL *toplevel, OBJECT *object)
         o_text_set_string (toplevel,
                            o_pinnum_attrib,
                            g_strdup_printf ("pinnumber=%s", current_pin));
-        o_text_recreate (toplevel, o_pinnum_attrib);
       }
 
       pin_counter++;




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