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

gEDA-cvs: gaf.git: branch: master updated (1.6.1-20100214-93-g4474d12)



The branch, master has been updated
       via  4474d121a1c2c81f8c79b95a426e3e7245eb032d (commit)
      from  960875cc1d57986f2d626b1843330b3bcc2efafa (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/include/prototype.h |   15 --
 gschem/src/o_grips.c       |  419 ++++++++++++++++++++++---------------------
 2 files changed, 214 insertions(+), 220 deletions(-)


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

commit 4474d121a1c2c81f8c79b95a426e3e7245eb032d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    gschem: Make o_grips_{start,end}_*() functions private to o_grips.c

:100644 100644 5278a9b... 4123acf... M	gschem/include/prototype.h
:100644 100644 5550ef9... 8c79b43... M	gschem/src/o_grips.c

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

commit 4474d121a1c2c81f8c79b95a426e3e7245eb032d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    gschem: Make o_grips_{start,end}_*() functions private to o_grips.c

diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index 5278a9b..4123acf 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -575,24 +575,9 @@ OBJECT *o_grips_search_picture_world(GSCHEM_TOPLEVEL *w_current, OBJECT *o_curre
 OBJECT *o_grips_search_circle_world(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int x, int y, int size, int *whichone);
 OBJECT *o_grips_search_line_world(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int x, int y, int size, int *whichone);
 int o_grips_start(GSCHEM_TOPLEVEL *w_current, int x, int y);
-void o_grips_start_arc(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int x, int y, int whichone);
-void o_grips_start_box(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int x, int y, int whichone);
-void o_grips_start_path(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int x, int y, int whichone);
-void o_grips_start_picture(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int x, int y, int whichone);
-void o_grips_start_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int x, int y, int whichone);
-void o_grips_start_line(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int x, int y, int whichone);
 void o_grips_motion(GSCHEM_TOPLEVEL *w_current, int x, int y);
 void o_grips_end(GSCHEM_TOPLEVEL *w_current);
 void o_grips_cancel(GSCHEM_TOPLEVEL *w_current);
-void o_grips_end_arc(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone);
-void o_grips_end_box(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone);
-void o_grips_end_path(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone);
-void o_grips_end_picture(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone);
-void o_grips_end_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone);
-void o_grips_end_line(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone);
-void o_grips_end_net(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone);
-void o_grips_end_pin(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone);
-void o_grips_end_bus(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone);
 int o_grips_size(GSCHEM_TOPLEVEL *w_current);
 void o_grips_draw(GSCHEM_TOPLEVEL *w_current, int x, int y);
 void o_grips_draw_rubber(GSCHEM_TOPLEVEL *w_current);
diff --git a/gschem/src/o_grips.c b/gschem/src/o_grips.c
index 5550ef9..8c79b43 100644
--- a/gschem/src/o_grips.c
+++ b/gschem/src/o_grips.c
@@ -523,92 +523,6 @@ OBJECT *o_grips_search_line_world(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
   return NULL;
 }
 
-/*! \brief Start process of modifiying one grip.
- *  \par Function Description
- *  This function starts the process of modifying one grip of an object
- *  on the current sheet. The event occured in (<B>w_x</B>,<B>w_y</B>) in world unit.
- *  If this position is related to a grip of an object, the function
- *  prepares the modification of this grip thanks to the user input.
- *
- *  The function returns <B>FALSE</B> if an error occured or if no grip
- *  have been found under (<B>w_x</B>,<B>w_y</B>). It returns <B>TRUE</B> if a grip
- *  has been found and modification of the object has been started.
- *
- *  If a grip has been found, this function modifies the GSCHEM_TOPLEVEL
- *  variables <B>which_grip</B> and <B>which_object</B> with the identifier
- *  of the grip and the object it belongs to respectively.
- *
- *  \param [in]  w_current  The GSCHEM_TOPLEVEL object.
- *  \param [in]  w_x        Current x coordinate of pointer in world units.
- *  \param [in]  w_y        Current y coordinate of pointer in world units.
- *  \return FALSE if an error occurred or no grip was found, TRUE otherwise.
- */
-int o_grips_start(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
-{
-  OBJECT *object;
-  int whichone;
-
-  if (w_current->draw_grips == FALSE) {
-    return(FALSE);
-  }
-
-  /* search if there is a grip on a selected object at (w_x,w_y) */
-  object = o_grips_search_world(w_current, w_x, w_y, &whichone);
-
-  if (object == NULL)
-    return FALSE;
-
-  w_current->which_grip = whichone;
-  w_current->which_object = object;
-
-  /* Switch off drawing for the object being modified */
-  object->dont_redraw = TRUE;
-  o_invalidate (w_current, object);
-
-  /* there is one */
-  /* depending on its type, start the modification process */
-  switch(object->type) {
-    case(OBJ_ARC):
-      /* start the modification of a grip on an arc */
-      o_grips_start_arc(w_current, object, w_x, w_y, whichone);
-      return(TRUE);
-
-    case(OBJ_BOX):
-      /* start the modification of a grip on a box */
-      o_grips_start_box(w_current, object, w_x, w_y, whichone);
-      return(TRUE);
-
-    case(OBJ_PATH):
-      /* start the modification of a grip on a path */
-      o_grips_start_path(w_current, object, w_x, w_y, whichone);
-      return(TRUE);
-
-    case(OBJ_PICTURE):
-      /* start the modification of a grip on a picture */
-      o_grips_start_picture(w_current, object, w_x, w_y, whichone);
-      return(TRUE);
-
-    case(OBJ_CIRCLE):
-      /* start the modification of a grip on a circle */
-      o_grips_start_circle(w_current, object, w_x, w_y, whichone);
-      return(TRUE);
-
-    case(OBJ_LINE):
-    case(OBJ_NET):
-    case(OBJ_PIN):
-    case(OBJ_BUS):
-      /* identical for line/net/pin/bus */
-      /* start the modification of a grip on a line */
-      o_grips_start_line(w_current, object, w_x, w_y, whichone);
-      return(TRUE);
-
-    default:
-      /* object type unknown : error condition */
-      return(FALSE);
-  }
-  return(FALSE);
-}
-
 /*! \brief Initialize grip motion process for an arc.
  *  \par Function Description
  *  This function initializes the grip motion process for an arc.
@@ -634,8 +548,8 @@ int o_grips_start(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
  *  \param [in]  y          (unused)
  *  \param [out] whichone   (unused)
  */
-void o_grips_start_arc(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
-                       int x, int y, int whichone)
+static void o_grips_start_arc(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                              int x, int y, int whichone)
 {
   w_current->last_drawb_mode = LAST_DRAWB_MODE_NONE;
 
@@ -675,8 +589,8 @@ void o_grips_start_arc(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
  *  \param [in]  y          (unused)
  *  \param [out] whichone   Which coordinate to check.
  */
-void o_grips_start_box(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
-                       int x, int y, int whichone)
+static void o_grips_start_box(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                              int x, int y, int whichone)
 {
   w_current->last_drawb_mode = LAST_DRAWB_MODE_NONE;
 
@@ -738,8 +652,8 @@ void o_grips_start_box(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
  *  \param [in]  y          (unused)
  *  \param [out] whichone   Which coordinate to check.
  */
-void o_grips_start_path(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
-                           int x, int y, int whichone)
+static void o_grips_start_path(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                               int x, int y, int whichone)
 {
   PATH_SECTION *section;
   int i;
@@ -808,8 +722,8 @@ void o_grips_start_path(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
  *  \param [in]  y          (unused)
  *  \param [out] whichone   Which coordinate to check.
  */
-void o_grips_start_picture(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
-                           int x, int y, int whichone)
+static void o_grips_start_picture(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                                  int x, int y, int whichone)
 {
   w_current->last_drawb_mode = LAST_DRAWB_MODE_NONE;
 
@@ -874,8 +788,8 @@ void o_grips_start_picture(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
  *  \param [in]  y          (unused)
  *  \param [out] whichone   Which coordinate to check.
  */
-void o_grips_start_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
-                          int x, int y, int whichone)
+static void o_grips_start_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                                 int x, int y, int whichone)
 {
 
   w_current->last_drawb_mode = LAST_DRAWB_MODE_NONE;
@@ -907,8 +821,8 @@ void o_grips_start_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
  *  \param [in]  y          (unused)
  *  \param [out] whichone   Which coordinate to check.
  */
-void o_grips_start_line(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
-                        int x, int y, int whichone)
+static void o_grips_start_line(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                               int x, int y, int whichone)
 {
   w_current->last_drawb_mode = LAST_DRAWB_MODE_NONE;
 
@@ -923,6 +837,92 @@ void o_grips_start_line(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
   w_current->rubber_visible = 1;
 }
 
+/*! \brief Start process of modifiying one grip.
+ *  \par Function Description
+ *  This function starts the process of modifying one grip of an object
+ *  on the current sheet. The event occured in (<B>w_x</B>,<B>w_y</B>) in world unit.
+ *  If this position is related to a grip of an object, the function
+ *  prepares the modification of this grip thanks to the user input.
+ *
+ *  The function returns <B>FALSE</B> if an error occured or if no grip
+ *  have been found under (<B>w_x</B>,<B>w_y</B>). It returns <B>TRUE</B> if a grip
+ *  has been found and modification of the object has been started.
+ *
+ *  If a grip has been found, this function modifies the GSCHEM_TOPLEVEL
+ *  variables <B>which_grip</B> and <B>which_object</B> with the identifier
+ *  of the grip and the object it belongs to respectively.
+ *
+ *  \param [in]  w_current  The GSCHEM_TOPLEVEL object.
+ *  \param [in]  w_x        Current x coordinate of pointer in world units.
+ *  \param [in]  w_y        Current y coordinate of pointer in world units.
+ *  \return FALSE if an error occurred or no grip was found, TRUE otherwise.
+ */
+int o_grips_start(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
+{
+  OBJECT *object;
+  int whichone;
+
+  if (w_current->draw_grips == FALSE) {
+    return(FALSE);
+  }
+
+  /* search if there is a grip on a selected object at (w_x,w_y) */
+  object = o_grips_search_world(w_current, w_x, w_y, &whichone);
+
+  if (object == NULL)
+    return FALSE;
+
+  w_current->which_grip = whichone;
+  w_current->which_object = object;
+
+  /* Switch off drawing for the object being modified */
+  object->dont_redraw = TRUE;
+  o_invalidate (w_current, object);
+
+  /* there is one */
+  /* depending on its type, start the modification process */
+  switch(object->type) {
+    case(OBJ_ARC):
+      /* start the modification of a grip on an arc */
+      o_grips_start_arc(w_current, object, w_x, w_y, whichone);
+      return(TRUE);
+
+    case(OBJ_BOX):
+      /* start the modification of a grip on a box */
+      o_grips_start_box(w_current, object, w_x, w_y, whichone);
+      return(TRUE);
+
+    case(OBJ_PATH):
+      /* start the modification of a grip on a path */
+      o_grips_start_path(w_current, object, w_x, w_y, whichone);
+      return(TRUE);
+
+    case(OBJ_PICTURE):
+      /* start the modification of a grip on a picture */
+      o_grips_start_picture(w_current, object, w_x, w_y, whichone);
+      return(TRUE);
+
+    case(OBJ_CIRCLE):
+      /* start the modification of a grip on a circle */
+      o_grips_start_circle(w_current, object, w_x, w_y, whichone);
+      return(TRUE);
+
+    case(OBJ_LINE):
+    case(OBJ_NET):
+    case(OBJ_PIN):
+    case(OBJ_BUS):
+      /* identical for line/net/pin/bus */
+      /* start the modification of a grip on a line */
+      o_grips_start_line(w_current, object, w_x, w_y, whichone);
+      return(TRUE);
+
+    default:
+      /* object type unknown : error condition */
+      return(FALSE);
+  }
+  return(FALSE);
+}
+
 /*! \brief Modify previously selected object according to mouse position.
  *  \par Function Description
  *  This function modify the previously selected
@@ -981,104 +981,6 @@ void o_grips_motion(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 }
 
 
-/*! \brief End process of modifying object with grip.
- *  \par Function Description
- *  This function ends the process of modifying a parameter of an object
- *  with a grip.
- *  The temporary representation of the object is erased, the object is
- *  modified and finally drawn.
- *
- *  The object under modification is <B>w_current->which_object</B> and
- *  the grip concerned is <B>w_current->which_grip</B>.
- *
- *  Depending on the object type, a specific function is used. It erases
- *  the temporary object, updates the object and draws the modified object
- *  normally.
- *
- *  \param [in,out] w_current  The GSCHEM_TOPLEVEL object.
- */
-void o_grips_end(GSCHEM_TOPLEVEL *w_current)
-{
-  TOPLEVEL *toplevel = w_current->toplevel;
-  OBJECT *object;
-  int grip;
-
-  object = w_current->which_object;
-  grip = w_current->which_grip;
-
-  if (!object) {
-    /* actually this is an error condition hack */
-    w_current->inside_action = 0;
-    i_set_state(w_current, SELECT);
-    return;
-  }
-
-  switch(object->type) {
-
-    case(OBJ_ARC):
-    /* modify an arc object */
-    o_grips_end_arc(w_current, object, grip);
-    break;
-
-    case(OBJ_BOX):
-    /* modify a box object */
-    o_grips_end_box(w_current, object, grip);
-    break;
-
-    case(OBJ_PATH):
-    /* modify a path object */
-    o_grips_end_path(w_current, object, grip);
-    break;
-
-    case(OBJ_PICTURE):
-    /* modify a picture object */
-    o_grips_end_picture(w_current, object, grip);
-    break;
-
-    case(OBJ_CIRCLE):
-    /* modify a circle object */
-    o_grips_end_circle(w_current, object, grip);
-    break;
-
-    case(OBJ_LINE):
-    /* modify a line object */
-    o_grips_end_line(w_current, object, grip);
-    break;
-
-    case(OBJ_NET):
-      /* modify a net object */
-      o_grips_end_net(w_current, object, grip);
-      break;
-
-    case(OBJ_PIN):
-      /* modify a pin object */
-      o_grips_end_pin(w_current, object, grip);
-      break;
-
-    case(OBJ_BUS):
-      /* modify a bus object */
-      o_grips_end_bus(w_current, object, grip);
-      break;
-
-    default:
-    return;
-  }
-
-  /* Switch drawing of the object back on */
-  object->dont_redraw = FALSE;
-  o_invalidate (w_current, object);
-
-  /* reset global variables */
-  w_current->which_grip = -1;
-  w_current->which_object = NULL;
-
-  w_current->rubber_visible = 0;
-
-  toplevel->page_current->CHANGED=1;
-  o_undo_savestate(w_current, UNDO_ALL);
-}
-
-
 /*! \brief Cancel process of modifying object with grip.
  *
  *  \par Function Description
@@ -1123,7 +1025,8 @@ void o_grips_cancel(GSCHEM_TOPLEVEL *w_current)
  *  \param [in] o_current  Arc OBJECT to end modification on.
  *  \param [in] whichone   Which grip is pointed to.
  */
-void o_grips_end_arc(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone)
+static void o_grips_end_arc(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                            int whichone)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
   int arg1, arg2;
@@ -1170,7 +1073,8 @@ void o_grips_end_arc(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone
  *  \param [in] o_current  Box OBJECT to end modification on.
  *  \param [in] whichone   Which grip is pointed to.
  */
-void o_grips_end_box(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone)
+static void o_grips_end_box(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                            int whichone)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
   int box_width, box_height;
@@ -1197,7 +1101,8 @@ void o_grips_end_box(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone
  *  \param [in] o_current  Picture OBJECT to end modification on.
  *  \param [in] whichone   Which grip is pointed to.
  */
-void o_grips_end_path(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone)
+static void o_grips_end_path(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                             int whichone)
 {
   /* erase the temporary path */
   /* if (w_current->rubber_visible) */
@@ -1215,7 +1120,8 @@ void o_grips_end_path(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichon
  *  \param [in] o_current  Picture OBJECT to end modification on.
  *  \param [in] whichone   Which grip is pointed to.
  */
-void o_grips_end_picture(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone)
+static void o_grips_end_picture(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                                int whichone)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
 
@@ -1253,7 +1159,8 @@ void o_grips_end_picture(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whic
  *  \param [in] o_current  Circle OBJECT to end modification on.
  *  \param [in] whichone   Which grip is pointed to.
  */
-void o_grips_end_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone)
+static void o_grips_end_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                               int whichone)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
 
@@ -1288,7 +1195,8 @@ void o_grips_end_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int which
  *  \param [in] o_current  Line OBJECT to end modification on.
  *  \param [in] whichone   Which grip is pointed to.
  */
-void o_grips_end_line(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone)
+static void o_grips_end_line(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                             int whichone)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
 
@@ -1326,7 +1234,8 @@ void o_grips_end_line(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichon
  *  \param [in] o_current  Net OBJECT to end modification on.
  *  \param [in] whichone   Which grip is pointed to.
  */
-void o_grips_end_net(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone)
+static void o_grips_end_net(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                            int whichone)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
   GList *prev_conn_objects;
@@ -1383,7 +1292,8 @@ void o_grips_end_net(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone
  *  \param [in] o_current  Net OBJECT to end modification on.
  *  \param [in] whichone   Which grip is pointed to.
  */
-void o_grips_end_pin(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone)
+static void o_grips_end_pin(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                            int whichone)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
   GList *prev_conn_objects;
@@ -1435,7 +1345,8 @@ void o_grips_end_pin(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone
  *  \param [in] o_current  bus OBJECT to end modification on.
  *  \param [in] whichone   Which grip is pointed to.
  */
-void o_grips_end_bus(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone)
+static void o_grips_end_bus(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
+                            int whichone)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
   GList *prev_conn_objects;
@@ -1471,6 +1382,104 @@ void o_grips_end_bus(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone
 }
 
 
+/*! \brief End process of modifying object with grip.
+ *  \par Function Description
+ *  This function ends the process of modifying a parameter of an object
+ *  with a grip.
+ *  The temporary representation of the object is erased, the object is
+ *  modified and finally drawn.
+ *
+ *  The object under modification is <B>w_current->which_object</B> and
+ *  the grip concerned is <B>w_current->which_grip</B>.
+ *
+ *  Depending on the object type, a specific function is used. It erases
+ *  the temporary object, updates the object and draws the modified object
+ *  normally.
+ *
+ *  \param [in,out] w_current  The GSCHEM_TOPLEVEL object.
+ */
+void o_grips_end(GSCHEM_TOPLEVEL *w_current)
+{
+  TOPLEVEL *toplevel = w_current->toplevel;
+  OBJECT *object;
+  int grip;
+
+  object = w_current->which_object;
+  grip = w_current->which_grip;
+
+  if (!object) {
+    /* actually this is an error condition hack */
+    w_current->inside_action = 0;
+    i_set_state(w_current, SELECT);
+    return;
+  }
+
+  switch(object->type) {
+
+    case(OBJ_ARC):
+    /* modify an arc object */
+    o_grips_end_arc(w_current, object, grip);
+    break;
+
+    case(OBJ_BOX):
+    /* modify a box object */
+    o_grips_end_box(w_current, object, grip);
+    break;
+
+    case(OBJ_PATH):
+    /* modify a path object */
+    o_grips_end_path(w_current, object, grip);
+    break;
+
+    case(OBJ_PICTURE):
+    /* modify a picture object */
+    o_grips_end_picture(w_current, object, grip);
+    break;
+
+    case(OBJ_CIRCLE):
+    /* modify a circle object */
+    o_grips_end_circle(w_current, object, grip);
+    break;
+
+    case(OBJ_LINE):
+    /* modify a line object */
+    o_grips_end_line(w_current, object, grip);
+    break;
+
+    case(OBJ_NET):
+      /* modify a net object */
+      o_grips_end_net(w_current, object, grip);
+      break;
+
+    case(OBJ_PIN):
+      /* modify a pin object */
+      o_grips_end_pin(w_current, object, grip);
+      break;
+
+    case(OBJ_BUS):
+      /* modify a bus object */
+      o_grips_end_bus(w_current, object, grip);
+      break;
+
+    default:
+    return;
+  }
+
+  /* Switch drawing of the object back on */
+  object->dont_redraw = FALSE;
+  o_invalidate (w_current, object);
+
+  /* reset global variables */
+  w_current->which_grip = -1;
+  w_current->which_object = NULL;
+
+  w_current->rubber_visible = 0;
+
+  toplevel->page_current->CHANGED=1;
+  o_undo_savestate(w_current, UNDO_ALL);
+}
+
+
 /*! \brief Get half the width and height of grip in screen units.
  *  \par Function Description
  *  According to the current zoom level, the function returns half the width




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