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

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-108-g938cdb9)



The branch, master has been updated
       via  938cdb93795422fceb56ee3b88bffd1602f8cdf4 (commit)
      from  62a38eefd8d3d9f84d8aeb78e2a1e365080d819c (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_bus_basic.c     |   26 +++-----------------------
 libgeda/src/o_complex_basic.c |   10 +---------
 libgeda/src/o_line_basic.c    |   10 +---------
 libgeda/src/o_net_basic.c     |   27 +++------------------------
 libgeda/src/o_pin_basic.c     |   26 +++-----------------------
 5 files changed, 11 insertions(+), 88 deletions(-)


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

commit 938cdb93795422fceb56ee3b88bffd1602f8cdf4
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date:   Sat Aug 16 14:09:03 2008 +0100

    libgeda: Only update bounds in o_*_recalc()
    
    Some constructors & modification functions were updating directly
    rather than calling the appropriate recalc function to do it.

:100644 100644 467dba9... ece05e0... M	libgeda/src/o_bus_basic.c
:100644 100644 42563c8... 1839742... M	libgeda/src/o_complex_basic.c
:100644 100644 db0d750... dde4956... M	libgeda/src/o_line_basic.c
:100644 100644 83e098a... 6f62dce... M	libgeda/src/o_net_basic.c
:100644 100644 b6bcfd4... f08584d... M	libgeda/src/o_pin_basic.c

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

commit 938cdb93795422fceb56ee3b88bffd1602f8cdf4
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date:   Sat Aug 16 14:09:03 2008 +0100

    libgeda: Only update bounds in o_*_recalc()
    
    Some constructors & modification functions were updating directly
    rather than calling the appropriate recalc function to do it.

diff --git a/libgeda/src/o_bus_basic.c b/libgeda/src/o_bus_basic.c
index 467dba9..ece05e0 100644
--- a/libgeda/src/o_bus_basic.c
+++ b/libgeda/src/o_bus_basic.c
@@ -50,7 +50,6 @@ OBJECT *o_bus_add(TOPLEVEL *toplevel, OBJECT *object_list,
 		  int x1, int y1, int x2, int y2,
 		  int bus_ripper_direction)
 {
-  int left, right, top, bottom;
   OBJECT *new_node;
 
   new_node = s_basic_new_object(type, "bus");
@@ -67,12 +66,7 @@ OBJECT *o_bus_add(TOPLEVEL *toplevel, OBJECT *object_list,
 
   new_node->bus_ripper_direction = bus_ripper_direction;
 
-  world_get_bus_bounds(toplevel, new_node, &left, &top, &right, &bottom);
-	
-  new_node->w_left = left;
-  new_node->w_top = top;
-  new_node->w_right = right;
-  new_node->w_bottom = bottom;	
+  o_bus_recalc (toplevel, new_node);
 
   new_node->draw_func = bus_draw_func;  
   new_node->sel_func = select_func;  
@@ -201,8 +195,6 @@ char *o_bus_save(OBJECT *object)
  */
 void o_bus_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object)
 {
-  int left, right, top, bottom;
-
   if (object == NULL) printf("btw NO!\n");
 
 
@@ -213,12 +205,7 @@ void o_bus_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object)
   object->line->y[1] = object->line->y[1] + dy;
 
   /* Update bounding box */
-  world_get_bus_bounds(toplevel, object, &left, &top, &right, &bottom);
-
-  object->w_left = left;
-  object->w_top = top;
-  object->w_right = right;
-  object->w_bottom = bottom;
+  o_bus_recalc (toplevel, object);
 
   s_tile_update_object(toplevel, object);
 }
@@ -477,17 +464,10 @@ void o_bus_consolidate(TOPLEVEL *toplevel)
 void o_bus_modify(TOPLEVEL *toplevel, OBJECT *object,
 		  int x, int y, int whichone)
 {
-  int left, right, top, bottom;
-
   object->line->x[whichone] = x;
   object->line->y[whichone] = y;
 
-  world_get_bus_bounds(toplevel, object, &left, &top, &right, &bottom);
-	
-  object->w_left = left;
-  object->w_top = top;
-  object->w_right = right;
-  object->w_bottom = bottom;	
+  o_bus_recalc (toplevel, object);
 
   s_tile_update_object(toplevel, object);
 }
diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index 42563c8..1839742 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -782,8 +782,6 @@ char *o_complex_save(OBJECT *object)
 void o_complex_translate_world(TOPLEVEL *toplevel, int dx, int dy,
                                OBJECT *object)
 {
-  int left, right, top, bottom;
-
   g_return_if_fail (object != NULL &&
                     (object->type == OBJ_COMPLEX ||
                      object->type == OBJ_PLACEHOLDER));
@@ -793,13 +791,7 @@ void o_complex_translate_world(TOPLEVEL *toplevel, int dx, int dy,
 
   o_list_translate_world(toplevel, dx, dy, object->complex->prim_objs);
 
-  world_get_object_list_bounds(toplevel, object->complex->prim_objs,
-                               &left, &top, &right, &bottom);
-
-  object->w_left = left;
-  object->w_top = top;
-  object->w_right = right;
-  object->w_bottom = bottom;
+  o_complex_recalc (toplevel, object);
 }
 
 /*! \brief
diff --git a/libgeda/src/o_line_basic.c b/libgeda/src/o_line_basic.c
index db0d750..dde4956 100644
--- a/libgeda/src/o_line_basic.c
+++ b/libgeda/src/o_line_basic.c
@@ -376,8 +376,6 @@ char *o_line_save(OBJECT *object)
 void o_line_translate_world(TOPLEVEL *toplevel,
 			    int dx, int dy, OBJECT *object)
 {
-  int left, right, top, bottom;
-
   if (object == NULL) printf("ltw NO!\n");
 
   /* Update world coords */
@@ -387,13 +385,7 @@ void o_line_translate_world(TOPLEVEL *toplevel,
   object->line->y[1] = object->line->y[1] + dy;
   
   /* Update bounding box */
-  world_get_line_bounds(toplevel, object, &left, &top, &right, &bottom);
-  
-  object->w_left   = left;
-  object->w_top    = top;
-  object->w_right  = right;
-  object->w_bottom = bottom;
-    
+  o_line_recalc (toplevel, object);
 }
 
 /*! \brief Rotate Line OBJECT using WORLD coordinates. 
diff --git a/libgeda/src/o_net_basic.c b/libgeda/src/o_net_basic.c
index 83e098a..6f62dce 100644
--- a/libgeda/src/o_net_basic.c
+++ b/libgeda/src/o_net_basic.c
@@ -62,7 +62,6 @@ void world_get_net_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left,
 OBJECT *o_net_add(TOPLEVEL *toplevel, OBJECT *object_list, char type,
 		  int color, int x1, int y1, int x2, int y2)
 {
-  int left, right, top, bottom;
   OBJECT *new_node;
 
   new_node = s_basic_new_object(type, "net");
@@ -77,13 +76,7 @@ OBJECT *o_net_add(TOPLEVEL *toplevel, OBJECT *object_list, char type,
   new_node->line->y[1] = y2;
   new_node->line_width = NET_WIDTH;
 
-  world_get_net_bounds(toplevel, new_node, &left, &top, &right,
-                 &bottom);
-
-  new_node->w_left = left;
-  new_node->w_top = top;
-  new_node->w_right = right;
-  new_node->w_bottom = bottom;
+  o_net_recalc (toplevel, new_node);
 
   new_node->draw_func = net_draw_func;
   new_node->sel_func = select_func;
@@ -209,8 +202,6 @@ char *o_net_save(OBJECT *object)
 void o_net_translate_world(TOPLEVEL *toplevel, int dx, int dy,
 			   OBJECT *object)
 {
-  int left, right, top, bottom;
-
   if (object == NULL)
   printf("ntw NO!\n");
 
@@ -222,12 +213,7 @@ void o_net_translate_world(TOPLEVEL *toplevel, int dx, int dy,
   object->line->y[1] = object->line->y[1] + dy;
 
   /* Update bounding box */
-  world_get_net_bounds(toplevel, object, &left, &top, &right, &bottom);
-
-  object->w_left = left;
-  object->w_top = top;
-  object->w_right = right;
-  object->w_bottom = bottom;
+  o_net_recalc (toplevel, object);
 
   s_tile_update_object(toplevel, object);
 }
@@ -607,17 +593,10 @@ void o_net_consolidate(TOPLEVEL *toplevel)
 void o_net_modify(TOPLEVEL *toplevel, OBJECT *object,
 		  int x, int y, int whichone)
 {
-  int left, right, top, bottom;
-
   object->line->x[whichone] = x;
   object->line->y[whichone] = y;
 
-  world_get_net_bounds(toplevel, object, &left, &top, &right, &bottom);
-
-  object->w_left = left;
-  object->w_top = top;
-  object->w_right = right;
-  object->w_bottom = bottom;
+  o_net_recalc (toplevel, object);
 
   s_tile_update_object(toplevel, object);
 }
diff --git a/libgeda/src/o_pin_basic.c b/libgeda/src/o_pin_basic.c
index b6bcfd4..f08584d 100644
--- a/libgeda/src/o_pin_basic.c
+++ b/libgeda/src/o_pin_basic.c
@@ -48,7 +48,6 @@ OBJECT *o_pin_add(TOPLEVEL *toplevel, OBJECT *object_list,
 		  char type, int color,
 		  int x1, int y1, int x2, int y2, int pin_type, int whichend)
 {
-  int left, right, top, bottom;
   OBJECT *new_node;
 
   new_node = s_basic_new_object(type, "pin");
@@ -62,12 +61,7 @@ OBJECT *o_pin_add(TOPLEVEL *toplevel, OBJECT *object_list,
   new_node->line->y[1] = y2;
   new_node->line_width = PIN_WIDTH;
 
-  world_get_pin_bounds(toplevel, new_node, &left, &top, &right, &bottom);
-	
-  new_node->w_left = left;
-  new_node->w_top = top;
-  new_node->w_right = right;
-  new_node->w_bottom = bottom;	
+  o_pin_recalc (toplevel, new_node);
 
   new_node->draw_func = pin_draw_func;  
   new_node->sel_func = select_func;  
@@ -205,8 +199,6 @@ char *o_pin_save(OBJECT *object)
  */
 void o_pin_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object)
 {
-  int left, right, top, bottom;
-
   if (object == NULL) printf("ptw NO!\n");
 
 
@@ -217,12 +209,7 @@ void o_pin_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object)
   object->line->y[1] = object->line->y[1] + dy;
 
   /* Update bounding box */
-  world_get_pin_bounds(toplevel, object, &left, &top, &right, &bottom);
-
-  object->w_left = left;
-  object->w_top = top;
-  object->w_right = right;
-  object->w_bottom = bottom;
+  o_pin_recalc (toplevel, object);
 
   s_tile_update_object(toplevel, object);
 }
@@ -350,17 +337,10 @@ void o_pin_mirror_world(TOPLEVEL *toplevel,
 void o_pin_modify(TOPLEVEL *toplevel, OBJECT *object,
 		  int x, int y, int whichone)
 {
-  int left, right, top, bottom;
-
   object->line->x[whichone] = x;
   object->line->y[whichone] = y;
 
-  world_get_pin_bounds(toplevel, object, &left, &top, &right, &bottom);
-	
-  object->w_left = left;
-  object->w_top = top;
-  object->w_right = right;
-  object->w_bottom = bottom;	
+  o_pin_recalc (toplevel, object);
 
   s_tile_update_object(toplevel, object);
 }




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