# HG changeset patch # User John W. Eaton # Date 1223665858 14400 # Node ID a10397d26114998bca6c7c5570eb2feb40f77b91 # Parent 2abbc8036f6a59369bd79724a3d43d387959750d graphics.cc (base_graphics_properties::adopt): place new child at front of list, not end; make children a column vector instead of a row vector diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2008-10-10 John W. Eaton + * graphics.h.in (base_properties::adopt): Place new child at front + of list, not end. Make list of children a column vector instead + of a row vector. + * graphics.cc (gh_manager::do_free): Set the beingdeleted property, then delete the children, then execute the deletefcn. (axes::properties::set_defaults, axes::properties::remove_child, diff --git a/src/graphics.h.in b/src/graphics.h.in --- a/src/graphics.h.in +++ b/src/graphics.h.in @@ -1615,8 +1615,10 @@ virtual void adopt (const graphics_handle& h) { octave_idx_type n = children.numel (); - children.resize (1, n+1); - children(n) = h.value (); + children.resize (n+1, 1); + for (octave_idx_type i = n; i > 0; i--) + children(i) = children(i-1); + children(0) = h.value (); mark_modified (); }