Mercurial > hg > octave-nkf
diff scripts/plot/figure.m @ 14183:9e6ec5f55827 stable
When creating an fltk (aqua) figure on MacOS, make sure one drawnow() occurs
before "visible" can be set "off".
* figure.m: For ismac() and graphics_toolikt == fltk, drawnow() before setting
properties. Bug # 31931.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Mon, 09 Jan 2012 20:28:08 -0500 |
parents | 72c96de7a403 |
children | d580d7179f85 |
line wrap: on
line diff
--- a/scripts/plot/figure.m +++ b/scripts/plot/figure.m @@ -63,7 +63,16 @@ if (rem (nargs, 2) == 0) if (isnan (f) || init_new_figure) - f = __go_figure__ (f, varargin{:}); + if (ismac () && strcmp (graphics_toolkit (), "fltk")) + ## FIXME - Hack for fltk-aqua to work around bug # 31931 + f = __go_figure__ (f); + drawnow (); + if (! isempty (varargin)) + set (f, varargin{:}); + endif + else + f = __go_figure__ (f, varargin{:}); + endif elseif (nargs > 0) set (f, varargin{:}); endif