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

gEDA-cvs: branch: master updated (1.1.2.20070818-118-g019d53d)



The branch, master has been updated
       via  019d53dce27bdbbb9871510ce34bb995664290c2 (commit)
       via  0312f7d113e616b0bb55880aa9d23a5197e821a5 (commit)
       via  ad5dcb91b8299dfbcda2e7507d4a42a6b6c0e9b0 (commit)
      from  193e2d4b748bc88d504abfa5b3cfba2382193d02 (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
=========

 libgeda/src/o_complex_basic.c |   13 +++----------
 libgeda/src/s_basic.c         |    1 +
 2 files changed, 4 insertions(+), 10 deletions(-)


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

commit 019d53dce27bdbbb9871510ce34bb995664290c2
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Nov 28 17:24:27 2007 +0000

    Simplify o_mirror_complex() coordinate calculation.
    
    No mathematical changes, just consolidate x and y coordinate
    expressions onto one line each, and avoid using temporary variables.

:100644 100644 f935f13... d1d841f... M	libgeda/src/o_complex_basic.c

commit 0312f7d113e616b0bb55880aa9d23a5197e821a5
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Nov 28 17:24:27 2007 +0000

    Fix bug introduced with refactoring of object mirroring API to libgeda.
    
    When reading a complex object from file, the mirror property of the
    complex is set to the desired value and later code then mirrors the
    prim_objs which make up the complex. o_complex_mirror_world() was used
    by mistake, where o_list_mirror_world() should have been used.
    
    This could be refactored so that complex creation uses higher level
    o_complex_{rotate,mirror}_world(), rather than setting the variables
    holding rotation / mirroring state, then manipulating the prim_objs.

:100644 100644 8edb84c... f935f13... M	libgeda/src/o_complex_basic.c

commit ad5dcb91b8299dfbcda2e7507d4a42a6b6c0e9b0
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Nov 28 17:24:27 2007 +0000

    Fix Bug #1838164. Initialise copied_to pointer in objects to NULL.
    
    Without explicitly initialising OBJECTs to have a copied_to pointer of
    NULL, copying a selection containing an attribute but not it's parent
    object could cause a segfault. The code checks to see where the parent
    object has been copied for correct attachemnt of the new attrib. If
    the parent object wasn't copied, this pointer should be NULL.

:100644 100644 8ee6385... ea51309... M	libgeda/src/s_basic.c

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

commit 019d53dce27bdbbb9871510ce34bb995664290c2
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Nov 28 17:24:27 2007 +0000

    Simplify o_mirror_complex() coordinate calculation.
    
    No mathematical changes, just consolidate x and y coordinate
    expressions onto one line each, and avoid using temporary variables.

diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index f935f13..d1d841f 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -1290,21 +1290,14 @@ void o_complex_mirror_world(TOPLEVEL *toplevel,
                             OBJECT *object)
 {
   int x, y;
-  int newx, newy;
 
   g_return_if_fail( object != NULL );
   g_return_if_fail( (object->type == OBJ_COMPLEX ||
                      object->type == OBJ_PLACEHOLDER) );
   g_return_if_fail( object->complex != NULL );
 
-  x = object->complex->x + (-world_centerx);
-  y = object->complex->y + (-world_centery);
-
-  newx = -x;
-  newy = y;
-
-  x = newx + (world_centerx);
-  y = newy + (world_centery);
+  x = 2 * world_centerx - object->complex->x;
+  y = object->complex->y;
 
   o_complex_translate_world(toplevel,
                             -object->complex->x,

commit 0312f7d113e616b0bb55880aa9d23a5197e821a5
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Nov 28 17:24:27 2007 +0000

    Fix bug introduced with refactoring of object mirroring API to libgeda.
    
    When reading a complex object from file, the mirror property of the
    complex is set to the desired value and later code then mirrors the
    prim_objs which make up the complex. o_complex_mirror_world() was used
    by mistake, where o_list_mirror_world() should have been used.
    
    This could be refactored so that complex creation uses higher level
    o_complex_{rotate,mirror}_world(), rather than setting the variables
    holding rotation / mirroring state, then manipulating the prim_objs.

diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index 8edb84c..f935f13 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -601,7 +601,7 @@ OBJECT *o_complex_add(TOPLEVEL *toplevel, OBJECT *object_list,
    */
   if (loaded_normally == TRUE) {
     if (mirror) {
-      o_complex_mirror_world(toplevel, 0, 0, new_node);
+      o_list_mirror_world(toplevel, 0, 0, prim_objs);
     }
 
     o_list_rotate_world(toplevel, 0, 0, angle, prim_objs);

commit ad5dcb91b8299dfbcda2e7507d4a42a6b6c0e9b0
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Nov 28 17:24:27 2007 +0000

    Fix Bug #1838164. Initialise copied_to pointer in objects to NULL.
    
    Without explicitly initialising OBJECTs to have a copied_to pointer of
    NULL, copying a selection containing an attribute but not it's parent
    object could cause a segfault. The code checks to see where the parent
    object has been copied for correct attachemnt of the new attrib. If
    the parent object wasn't copied, this pointer should be NULL.

diff --git a/libgeda/src/s_basic.c b/libgeda/src/s_basic.c
index 8ee6385..ea51309 100644
--- a/libgeda/src/s_basic.c
+++ b/libgeda/src/s_basic.c
@@ -216,6 +216,7 @@ OBJECT *s_basic_init_object( char *name )
 	
   new_node->attribs = NULL;
   new_node->attached_to = NULL;
+  new_node->copied_to = NULL;
   new_node->attribute = 0; 
   new_node->show_name_value = SHOW_NAME_VALUE;
   new_node->visibility = VISIBLE;




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