On Wed, Dec 19, 2007 at 05:15:03PM -0800, Ben Jackson wrote:
>
> I bet what's going on is that PCB->Data isn't assigned until after the
> board loads. If you 'revert' it works fine, because it uses the previously
> loaded board's value.
>
> So in parse_y.y there's an InitClip and I'm guessing PCB->Data->LayerN
> is not yet yyData->LayerN.
>
> I went to max_layer because that seemed to be the trend elsewhere (and
> since it references the board, it eliminates the need to mess with every
> buffer when you load a new board). We can certainly change polygon.c
> back, but I bet either way is wrong for some things.
Any ideas here? It makes sense to ignore Data->LayerN for buffers (treating
them all as matching the current board) but it doesn't work when loading
a board (where the Data really is distinct from the loaded board).
The only "safe" way I can think to fix this is to change the max_layer
macro to be
max_layer(D) ((D)->LayerN ? (D)->LayerN : PCB->Data->LayerN)
and then everything does max_layer(Data) and LayerN==0 means "use the
current board".
There are about 200 places to change :(
--
Ben Jackson AD7GD
<[EMAIL PROTECTED]>
http://www.ben.com/
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev