Mercurial > hg > octave-lyh
diff scripts/plot/legend.m @ 17111:dbd64c9a16da
Restore graphics toolkit after %!tests that alter it.
* scripts/plot/allchild.m, scripts/plot/findall.m, scripts/plot/findobj.m,
scripts/plot/graphics_toolkit.m, scripts/plot/legend.m, scripts/plot/uimenu.m:
Restore graphics toolkit after %!tests that alter it.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 29 Jul 2013 12:23:10 -0700 |
parents | 991e8a386aa3 |
children | bd50e0660545 |
line wrap: on
line diff
--- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -1547,8 +1547,8 @@ %! legend (option); %!test -%! graphics_toolkit ("gnuplot"); -%! h = figure ("visible", "off", "__graphics_toolkit__", "gnuplot"); +%! toolkit = graphics_toolkit ("gnuplot"); +%! h = figure ("visible", "off") %! unwind_protect %! position = get (h, "position"); %! plot (rand (3)); @@ -1559,5 +1559,6 @@ %! assert (get (h, "position"), position); %! unwind_protect_cleanup %! close (h); +%! graphics_toolkit (toolkit); %! end_unwind_protect