#! /bin/sh /usr/share/dpatch/dpatch-run ## -*- diff -*- ## proper-delete-of-axes-in-clf.dpatch by Rafael Laboissiere ## ## DP: Proper deletion of axes in clf.m. Fix a regression problem ## DP: between version 3.0.3 and 3.04-rc5. Proposed by Marco Caliari ## DP: in the octave-maintainers mailing list on 2008-02-25. @DPATCH@ --- octave3.0-3.0.4~rc5.orig/scripts/plot/clf.m +++ octave3.0-3.0.4~rc5/scripts/plot/clf.m @@ -71,7 +71,9 @@ hc = get (hfig, "children"); endif + set (hfig, "currentaxes", []); ## Delete the children. - delete (hc); - + if (ishandle (hc)) + delete (hc); + endif endfunction --- octave3.0-3.0.4~rc5.orig/src/graphics.cc +++ octave3.0-3.0.4~rc5/src/graphics.cc @@ -715,7 +715,7 @@ if (k >= 0) { - Matrix new_kids (n-1, 1); + Matrix new_kids (1, n-1); octave_idx_type j = 0; for (octave_idx_type i = 0; i < n; i++) { --- octave3.0-3.0.4~rc5.orig/scripts/plot/legend.m +++ octave3.0-3.0.4~rc5/scripts/plot/legend.m @@ -171,7 +171,7 @@ endif warned = false; - for i = nargs:-1:1 + for i = 1:nargs arg = varargin{i}; if (ischar (arg)) while (k <= nkids