# HG changeset patch # User Rik # Date 1625763513 25200 # Node ID 4583e97411a2e698b1e7411d6822009c58a0d964 # Parent 6dc298d3261cb22fe2789bd480b3b59c8ac5ce74# Parent 2624ee427735261c967d91e4c1e1f0a28a361ede maint: merge stable to default. diff -r 6dc298d3261c -r 4583e97411a2 scripts/plot/util/copyobj.m --- 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 diff -r 6dc298d3261c -r 4583e97411a2 scripts/plot/util/hgsave.m --- 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