Mercurial > hg > octave-nkf
diff scripts/plot/util/print.m @ 17723:132d9f543cc5
print.m: 2nd fix for printing when using -F option (bug #40334)
* scripts/plot/util/print.m: Apply fontsize attribute to non-axes objects
first to avoid triggering legend fontsize callback which destroys objects
in the list.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 22 Oct 2013 06:32:54 -0700 |
parents | e477578fca3d |
children | 4e225f952885 |
line wrap: on
line diff
--- a/scripts/plot/util/print.m +++ b/scripts/plot/util/print.m @@ -405,8 +405,12 @@ ## This is done to work around the bbox being whole numbers. fontsize = fontsize * opts.scalefontsize; endif - ## FIXME: sort needed so legend child objects are acted on first - set (sort (h(ishandle (h))), "fontsize", fontsize); + ## FIXME: legend child objects need to be acted on first. + ## or legend fontsize callback will destroy them. + hlist = h(ishandle (h)); + haxes = strcmp (get (hlist, "type"), "axes"); + set (hlist(! haxes), "fontsize", fontsize); + set (hlist(haxes), "fontsize", fontsize); endif endif