Mercurial > octave
changeset 29861:4583e97411a2
maint: merge stable to default.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 08 Jul 2021 09:58:33 -0700 |
parents | 6dc298d3261c (current diff) 2624ee427735 (diff) |
children | 255fa40977c0 |
files | scripts/plot/util/copyobj.m scripts/plot/util/hgsave.m |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/copyobj.m Wed Jul 07 12:15:11 2021 -0700 +++ b/scripts/plot/util/copyobj.m Thu Jul 08 09:58:33 2021 -0700 @@ -203,7 +203,7 @@ %! set (hnew, "position", [scrn(3)/2, scrn(4)/2-pos(4)/2, pos(3:4)]); %! drawnow (); -%!testif HAVE_MAGICK; (have_window_system () && __have_feature__ ("QT_OFFSCREEN") && strcmp ("qt", graphics_toolkit ())) +%!testif HAVE_MAGICK; (have_window_system () && __have_feature__ ("QT_OFFSCREEN") && any (strcmp ("qt", available_graphics_toolkits ()))); %! toolkit = graphics_toolkit (); %! graphics_toolkit ("qt"); %! unwind_protect
--- a/scripts/plot/util/hgsave.m Wed Jul 07 12:15:11 2021 -0700 +++ b/scripts/plot/util/hgsave.m Thu Jul 08 09:58:33 2021 -0700 @@ -90,7 +90,9 @@ endfunction -%!testif HAVE_MAGICK; (have_window_system () && __have_feature__ ("QT_OFFSCREEN") && strcmp ("qt", graphics_toolkit ())) || strcmp ("gnuplot", graphics_toolkit ()); +%!testif HAVE_MAGICK; (have_window_system () && __have_feature__ ("QT_OFFSCREEN") && any (strcmp ("qt", available_graphics_toolkits ()))); +%! toolkit = graphics_toolkit (); +%! graphics_toolkit ("qt"); %! h1 = figure ("visible", "off", "paperposition", [0.25, 2.5, 8.0, 6.0]); %! unwind_protect %! x = 0:0.1:2*pi; @@ -127,6 +129,7 @@ %! unwind_protect_cleanup %! close (h1); %! close (h2); +%! graphics_toolkit (toolkit); %! end_unwind_protect ## Test input validation