Mercurial > hg > octave-lojdl
changeset 8210:a10397d26114
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
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 10 Oct 2008 15:10:58 -0400 |
parents | 2abbc8036f6a |
children | 851803f7bb4d |
files | src/ChangeLog src/graphics.h.in |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2008-10-10 John W. Eaton <jwe@octave.org> + * 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,
--- 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 (); }