# HG changeset patch # User Rik # Date 1383928269 28800 # Node ID 1d109119ac71fe075db46901ea490d9ccb95b6a6 # Parent 766ad9be296678cc700b59eafd51c05a47a472b4 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. diff --git a/scripts/plot/appearance/legend.m b/scripts/plot/appearance/legend.m --- a/scripts/plot/appearance/legend.m +++ b/scripts/plot/appearance/legend.m @@ -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);