[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: big bug in group move fixed (pcb)
I just fixed:
[ 1753280 ] sometimes you can't move a line up/left from start
Which turns out to actually be a much more general problem when you drag
groups containing only lines, arcs, texts and polygons. The region you
were restricted to was wrong. It was most obvious before you moved
groups that had elements or vias (which would ensure that the region did
not let you move up/left), but it was always giving you odd bounds to
work in. That's why I'm announcing this.
Here's my sf comment:
...This is due to a very simple but supremely arcane fact: PCB
thought paste buffers had 0 layers. Therefore they are only
non-empty if they have elements or vias. Lines, arcs, texts and
polygons appear on layers, which were not checked. As a result,
pastebuffers did not get a new bounding box if your selection
didn't include at least one element or via. Thus the code to
prohibit movement of pasted items (which includes group moves)
was restricted to bizzare numbers, owing to the fact that the
'mark' of the buffer (where you clicked to pick it up) was
*outside* its uninitialized bounding box. If you moved a via
or element (or a group of things including them), the bounding
box of the buffer would get set to *something* and you'd be able
to then move lines and so on a little bit. The bounds would be
odd, but if you didn't hit them (as you were, ahem, bound to
with an all-0 bounding box) you didn't notice.
This is due to Data->LayerN being uninitialized in buffers of
all kinds. It seems the intention is to use 'max_layer'
everywhere, which is actually a macro for 'PCB->Data->LayerN',
ie the number of layers in the loaded board. The empty test in
misc.c and a half dozen places in polygon.c used Data->LayerN
and I changed them all to max_layer.
--
Ben Jackson AD7GD
<ben@xxxxxxx>
http://www.ben.com/
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user