changeset 17885:1d109119ac71

legend.m: Don't add listener for 'fontsize' if using gnuplot. Temporary hack to produce images for Octave manual for 3.8.0 release. * scripts/plot/appearance/legend.m: When toolkit is gnuplot, don't add listener on 'fontsize' property.
author Rik <rik@octave.org>
date Fri, 08 Nov 2013 08:31:09 -0800
parents 766ad9be2966
children 326963e47984
files scripts/plot/appearance/legend.m
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/appearance/legend.m	Fri Nov 08 07:40:36 2013 -0800
+++ b/scripts/plot/appearance/legend.m	Fri Nov 08 08:31:09 2013 -0800
@@ -1004,7 +1004,16 @@
           addlistener (hlegend, "textcolor", @updatelegendtext);
           ## Properties which could change size of box, such as fontsize,
           ## require legend to be redrawn.
-          addlistener (hlegend, "fontsize", @updatelegend);
+          ## FIXME: fontsize is changed by print.m function during the
+          ##        production of a plot for output.  This screws things up
+          ##        because legend tries to return the axes size to what it
+          ##        was when the figure was created, versus what it is now
+          ##        when the figure is being printed.  Temporary hack is
+          ##        good enough for generating the Octave manual which still
+          ##        relies on gnuplot for generating images.  See bug #40333.
+          if (! gnuplot)
+            addlistener (hlegend, "fontsize", @updatelegend);
+          endif
           addlistener (hlegend, "fontunits", @updatelegend);
           addlistener (hlegend, "interpreter", @updatelegend);
           addlistener (hlegend, "location", @updatelegend);