Mercurial > octave
comparison 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 |
comparison
equal
deleted
inserted
replaced
17722:5b0036d89d4a | 17723:132d9f543cc5 |
---|---|
403 endif | 403 endif |
404 if (! isempty (opts.scalefontsize) && ! opts.scalefontsize != 1) | 404 if (! isempty (opts.scalefontsize) && ! opts.scalefontsize != 1) |
405 ## This is done to work around the bbox being whole numbers. | 405 ## This is done to work around the bbox being whole numbers. |
406 fontsize = fontsize * opts.scalefontsize; | 406 fontsize = fontsize * opts.scalefontsize; |
407 endif | 407 endif |
408 ## FIXME: sort needed so legend child objects are acted on first | 408 ## FIXME: legend child objects need to be acted on first. |
409 set (sort (h(ishandle (h))), "fontsize", fontsize); | 409 ## or legend fontsize callback will destroy them. |
410 hlist = h(ishandle (h)); | |
411 haxes = strcmp (get (hlist, "type"), "axes"); | |
412 set (hlist(! haxes), "fontsize", fontsize); | |
413 set (hlist(haxes), "fontsize", fontsize); | |
410 endif | 414 endif |
411 endif | 415 endif |
412 | 416 |
413 ## call the graphcis toolkit print script | 417 ## call the graphcis toolkit print script |
414 switch (get (opts.figure, "__graphics_toolkit__")) | 418 switch (get (opts.figure, "__graphics_toolkit__")) |