changeset 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 5b0036d89d4a
children f0bc865db55f
files scripts/plot/util/print.m
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/print.m	Tue Oct 22 05:33:35 2013 -0400
+++ b/scripts/plot/util/print.m	Tue Oct 22 06:32:54 2013 -0700
@@ -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