[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: PCB nanometer git tree
Andrew Poelstra:
> On Wed, Aug 10, 2011 at 01:07:48PM -0700, Colin D Bennett wrote:
...
> > OK, I have noticed one bug. If I draw some lines on a copper layer,
> > two strange things occur:
> >
> > (1) When I click on a line, it becomes highlighted and is selected. If
> > I then click another line, it is also highlighted, but the first line
> > remains highlighted as well. Every line clicked adds to the set of
> > highlighted lines. I can, however, deselect a line by Shift-clicking
> > it.
> >
> > (2) If I click and drag a *non-selected* line, I can move it OK.
> > However, if I try to drag one or more selected lines, they vanish.
> >
>
> Both fixed in pcb-andrew.
>
> The fix was to change LARGE_VALUE from a hard-coded value to
> (LONG_MAX / 2 - 1), which ensures that a box with extents
>
> (-LARGE_VALUE, -LARGE_VALUE) -- (LARGE_VALUE, LARGE_VALUE)
>
> can be handled cleanly in Coord units.
It seems to work after this patch also:
///
diff --git a/globalconst.h b/globalconst.h
index 6599823..12c0592 100755
--- a/globalconst.h
+++ b/globalconst.h
@@ -60,7 +60,7 @@
/* ---------------------------------------------------------------------------
* some limit specifications
*/
-#define LARGE_VALUE (LONG_MAX / 2 - 1) /* maximum extent of board and elements */
+#define LARGE_VALUE LONG_MAX /* (LONG_MAX / 2 - 1) maximum extent of board and elements */
#define MAX_LAYER 16 /* max number of layer, check source */
/* code for more changes, a *lot* more changes */
///
A Coord is a typedef for long, and a long is signed type. Its range is
LONG_MIN to LONG_MAX, where
$ grep -- -LONG_MAX /usr/include/limits.h
# define LONG_MIN (-LONG_MAX - 1L)
on a typical 2's complement machine.
Why do you want to use only half the range?
Hälsningar,
/Karl Hammar
-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sverige
0173 140 57
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user