gEDA-dev: Noscreen branch

Peter Clifton pcjc2 at cam.ac.uk
Tue Apr 3 15:54:40 EDT 2007


On Mon, 2007-04-02 at 23:25 -0400, Ales Hvezda wrote:
> I've spent a little time testing it.  I did find something odd:
> 
> * Open up gschem/tests/embedded.sch or gschem/tests/versionsym2.sch
> * Notice the initial display isn't drawn correctly.  
> * Executing Zoom Limits doesn't do the right thing.
> 
> I'm guess this is due to not handling the bounding calculation of embedded
> components correctly.  I'll keep testing and playing with the branch.

This is a pain - due to the way embedded components are constructed. The
o_read() function encounters the embedding, then adds the new components
to the prim_objects list of the complex. The added objects are children
of the complex, but the complex doesn't have its bounds updated.

The one-liner attached solves the problem - by computing the complex
bounds when the end embedding tag is encountered. I'm not sure I feel
entirely comfortable calling o_complex_recalc() outside
o_complex_basic.c, but it does the trick.

I've not committed it to CVS yet, to give me time to see if there is a
"nicer" way.

Ales:

What do you think to the patch?

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_embeded_bounds.diff
Type: text/x-patch
Size: 505 bytes
Desc: not available
Url : http://www.seul.org/pipermail/geda-dev/attachments/20070403/d5cf589c/fix_embeded_bounds.bin


More information about the geda-dev mailing list