[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gEDA-dev: Noscreen branch
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!)
diff --git a/libgeda/src/a_basic.c b/libgeda/src/a_basic.c
index fbe0a1e..1b0e8e5 100644
--- a/libgeda/src/a_basic.c
+++ b/libgeda/src/a_basic.c
@@ -467,6 +467,7 @@ OBJECT *o_read(TOPLEVEL *w_current, OBJECT *object_list, char *filename)
w_current->page_current->object_tail = temp_tail;
w_current->page_current->object_parent = temp_parent;
+ o_complex_recalc( w_current, object_list );
embedded_level--;
} else {
fprintf(stderr, "Read unexpected embedded "
_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev