Revision: 45903
http://brlcad.svn.sourceforge.net/brlcad/?rev=45903&view=rev
Author: bhinesley
Date: 2011-08-10 19:35:33 +0000 (Wed, 10 Aug 2011)
Log Message:
-----------
flags for all 3 coordinates supplied in the "[x [y [z]]]" format were being set
regardless of whether or not some of the optional coordinates were omitted
Modified Paths:
--------------
brlcad/trunk/src/libged/edit.c
Modified: brlcad/trunk/src/libged/edit.c
===================================================================
--- brlcad/trunk/src/libged/edit.c 2011-08-10 17:01:45 UTC (rev 45902)
+++ brlcad/trunk/src/libged/edit.c 2011-08-10 19:35:33 UTC (rev 45903)
@@ -1926,11 +1926,13 @@
return GED_ERROR;
}
- /* if either all coordinates are being set or an object has been
+ /* if either all coordinates are to be set or an object has been
* set, then attempt to intepret/record the number as the next
- * unset X, Y, or Z Z coordinate/position
+ * unset X, Y, or Z coordinate/position
*/
- if ((arg->coords_used & EDIT_COORDS_ALL) || arg->object) {
+ if (((arg->coords_used & EDIT_COORD_X) &&
+ (arg->coords_used & EDIT_COORD_Y) &&
+ (arg->coords_used & EDIT_COORD_Z)) || arg->object) {
if (!arg->vector) {
arg->vector = (vect_t *)bu_malloc(sizeof(vect_t),
"vect_t block for edit_str_to_arg");
@@ -2038,7 +2040,19 @@
--(*argc);
++(*argv);
}
+
+ /* disable unsupplied optional coords (from "[x [y [z]]]" fmt) */
+ if ((arg->coords_used & EDIT_COORDS_ALL) == EDIT_COORDS_ALL)
+ if (arg->coords_used & EDIT_COORD_IS_SET_X)
+ arg->coords_used |= EDIT_COORD_X;
+ if (arg->coords_used & EDIT_COORD_IS_SET_Y)
+ arg->coords_used |= EDIT_COORD_Y;
+ if (arg->coords_used & EDIT_COORD_IS_SET_Z)
+ arg->coords_used |= EDIT_COORD_Z;
+
/* these flags are only for internal use */
+ /* FIXME: exactly why they should be internalized, and not
+ * edit_arg flags */
arg->coords_used &= ~(EDIT_COORD_IS_SET_X | EDIT_COORD_IS_SET_Y |
EDIT_COORD_IS_SET_Z);
return ret;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits