[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-105-g11fa9b4)
The branch, master has been updated
via 11fa9b447a32bbee93734628233f6ca5b807c740 (commit)
from 31d7bbb485ae0fff08353f3f1882e3fd791ffea8 (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_move.c | 75 +++++++++++++++++++++++---------------------------
1 files changed, 35 insertions(+), 40 deletions(-)
=================
Commit Messages
=================
commit 11fa9b447a32bbee93734628233f6ca5b807c740
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Fri Aug 15 12:36:53 2008 +0100
gschem: Only add nets and buses to the stretch list. (CODE THIS TIME!)
Only nets and buses are rubberbanded, so there is no point adding other
connected items (such as pins) into the stretch list.
This fixes a bug where pins attached to nets being moved disappear if
the user pans whilst moving. (The objects in the stretch list are marked
"don't redraw" when starting a move operation.)
To avoid nesting (yet another) huge "if" clause in the length of the loop
in o_move_check_endpoint(), the loop has been re-written as a "for" loop
to ensure its iterator is incremented when the loop is "continue"'d.
The various nested : if (test) {...} // wrapping the loop's core
are now: if (!test) continue;
:100644 100644 8f7c7d2... 74e71c4... M gschem/src/o_move.c
=========
Changes
=========
commit 11fa9b447a32bbee93734628233f6ca5b807c740
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Fri Aug 15 12:36:53 2008 +0100
gschem: Only add nets and buses to the stretch list. (CODE THIS TIME!)
Only nets and buses are rubberbanded, so there is no point adding other
connected items (such as pins) into the stretch list.
This fixes a bug where pins attached to nets being moved disappear if
the user pans whilst moving. (The objects in the stretch list are marked
"don't redraw" when starting a move operation.)
To avoid nesting (yet another) huge "if" clause in the length of the loop
in o_move_check_endpoint(), the loop has been re-written as a "for" loop
to ensure its iterator is incremented when the loop is "continue"'d.
The various nested : if (test) {...} // wrapping the loop's core
are now: if (!test) continue;
diff --git a/gschem/src/o_move.c b/gschem/src/o_move.c
index 8f7c7d2..74e71c4 100644
--- a/gschem/src/o_move.c
+++ b/gschem/src/o_move.c
@@ -359,62 +359,57 @@ void o_move_check_endpoint(GSCHEM_TOPLEVEL *w_current, OBJECT * object)
if (object->type != OBJ_NET && object->type != OBJ_PIN &&
object->type != OBJ_BUS) {
- fprintf(stderr,
- _("Got a non line object in o_move_check_endpoint\n"));
+ fprintf(stderr, _("Got a non line object in o_move_check_endpoint\n"));
return;
}
- cl_current = object->conn_list;
- while (cl_current != NULL) {
+ for (cl_current = object->conn_list;
+ cl_current != NULL;
+ cl_current = g_list_next(cl_current)) {
c_current = (CONN *) cl_current->data;
- if (c_current->other_object != NULL) {
+ if (c_current->other_object == NULL)
+ continue;
- /* really make sure that the object is not selected */
- if (c_current->other_object->saved_color == -1 &&
- c_current->other_object->selected == FALSE) {
+ /* really make sure that the object is not selected */
+ if (c_current->other_object->saved_color != -1 ||
+ c_current->other_object->selected == TRUE)
+ continue;
- if (c_current->type == CONN_ENDPOINT ||
- (c_current->type == CONN_MIDPOINT &&
- c_current->other_whichone != -1)) {
+ if (c_current->type != CONN_ENDPOINT &&
+ (c_current->type != CONN_MIDPOINT ||
+ c_current->other_whichone == -1))
+ continue;
- whichone =
- o_move_return_whichone(c_current->other_object,
- c_current->x, c_current->y);
+ /* Only attempt to stretch nets and buses */
+ if (c_current->other_object->type != OBJ_NET &&
+ c_current->other_object->type != OBJ_BUS)
+ continue;
-#if DEBUG
- printf
- ("FOUND: %s type: %d, whichone: %d, x,y: %d %d\n",
- c_current->other_object->name, c_current->type,
- whichone, c_current->x, c_current->y);
-#endif
+ whichone = o_move_return_whichone(c_current->other_object,
+ c_current->x,
+ c_current->y);
#if DEBUG
- printf("other x,y: %d %d\n", c_current->x,
- c_current->y);
- printf("type: %d return: %d real: [ %d %d ]\n",
- c_current->type, whichone, c_current->whichone,
- c_current->other_whichone);
+ printf ("FOUND: %s type: %d, whichone: %d, x,y: %d %d\n",
+ c_current->other_object->name, c_current->type,
+ whichone, c_current->x, c_current->y);
+
+ printf("other x,y: %d %d\n", c_current->x, c_current->y);
+ printf("type: %d return: %d real: [ %d %d ]\n",
+ c_current->type, whichone, c_current->whichone,
+ c_current->other_whichone);
#endif
- if (whichone >= 0 && whichone <= 1) {
- toplevel->page_current->stretch_tail =
- s_stretch_add(toplevel->page_current->
- stretch_head,
- c_current->other_object,
- c_current, whichone);
-
- if (c_current->other_object->type == OBJ_NET ||
- c_current->other_object->type == OBJ_BUS) {
- o_erase_single(w_current, c_current->other_object);
- }
- }
+ if (whichone >= 0 && whichone <= 1) {
+ toplevel->page_current->stretch_tail =
+ s_stretch_add(toplevel->page_current->stretch_head,
+ c_current->other_object,
+ c_current, whichone);
- }
- }
+ o_erase_single(w_current, c_current->other_object);
}
- cl_current = g_list_next(cl_current);
}
}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs