Mercurial > hg > octave-nkf
diff src/graphics.h.in @ 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 | f6ca8ff51818 |
children | 11badf6c9e9f |
line wrap: on
line diff
--- 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 (); }